-
-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make corelib more customizable by adding requires for dependant files
- v1.8.3.rc1
- v1.8.2
- v1.8.1
- v1.8.0
- v1.8.0.beta1
- v1.8.0.alpha1
- v1.7.4
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
- v1.7.0.rc1
- v1.6.1
- v1.6.0
- v1.6.0.rc1
- v1.6.0.alpha1
- v1.5.1
- v1.5.0
- v1.5.0.rc1
- v1.4.1
- v1.4.0
- v1.4.0.alpha1
- v1.3.2
- v1.3.1
- v1.3.0
- v1.3.0.rc1
- v1.3.0.alpha1
- v1.2.0
- v1.2.0.beta1
- v1.1.1
- v1.1.1.rc1
- v1.1.0
- v1.1.0.rc1
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v1.0.0.beta1
- v0.11.4
- v0.11.3
- v0.11.2
- v0.11.1
- v0.11.1.pre
- v0.11.0
- v0.11.0.rc1
- v0.10.6
- v0.10.6.beta
- v0.10.5
- v0.10.4
- v0.10.3
- v0.10.2
- v0.10.1
- v0.10.0
- v0.10.0.rc2
- v0.10.0.rc1
- v0.10.0.beta5
- v0.10.0.beta4
- v0.10.0.beta3
- v0.10.0.beta2
- v0.10.0.beta1
- v0.9.4
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9.0
- v0.9.0.rc1
- v0.9.0.beta2
- v0.9.0.beta1
- v0.8.1
- v0.8.1.rc1
- v0.8.0
- v0.8.0.rc3
- v0.8.0.rc2
- v0.8.0.rc1
- v0.8.0.beta1
- v0.7.2
- v0.7.1
- v0.7.0
- v0.7.0.rc1
- v0.7.0.beta3
- v0.7.0.beta2
- v0.7.0.beta1
- v0.6.3
- v0.6.2
- v0.6.1
- v0.6.0
- v0.0.1-alpha.1
- npm-0.0.1-alpha.8
- npm-0.0.1-alpha.7
- npm-0.0.1-alpha.6
- npm-0.0.1-alpha.5
- npm-0.0.1-alpha.4
- npm-0.0.1-alpha.3
- lerna-0.0.1-alpha.2
1 parent
f753d31
commit 4f7f1ca
Showing
9 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'corelib/enumerable' | ||
|
||
class Array | ||
include Enumerable | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'corelib/module' | ||
|
||
class Class | ||
def self.new(sup = Object, &block) | ||
%x{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'corelib/enumerable' | ||
|
||
class Enumerator | ||
include Enumerable | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'corelib/enumerable' | ||
|
||
class Hash | ||
include Enumerable | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'corelib/comparable' | ||
|
||
class Numeric | ||
include Comparable | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'corelib/enumerable' | ||
|
||
class Range | ||
include Enumerable | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'corelib/comparable' | ||
|
||
class String | ||
include Comparable | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
require 'corelib/comparable' | ||
|
||
class Time | ||
include Comparable | ||
|
||
|
4f7f1ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 is mopal on its way? :)
4f7f1ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep 😄 been using some hardcoded mopal/mini-opal files in a site coming up. Just trying to work out now which files belong in mopal, and which ones could be optional..
4f7f1ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is the idea that you could only require parts of corelib?
4f7f1ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryanstout yep! I also want to add a
mopal.rb
file into corelib, so you can require that instead ofopal
and get this cut down lib. All the core files are still requirable, so you can mix and match as you like. e.g. if you don't wantStruct
, then just dont require it.4f7f1ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So mopal would be the corelib's required to make the super basics work, but then you would require in other things you needed, Struct, Time, etc...?
4f7f1ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Off the top of my head, mopal would include array, hash, string, numeric, proc, enumerable and class/module. It is fair to say that a lot of apps/projects would need more than that, but mopal is just a simple way to get a really small runtime to do the very basic ruby. Aimed at websites rather than webapps I guess.
4f7f1ca
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like a great idea.