inheritance_module_eval 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -2,6 +2,9 @@ rvm:
2
2
  - 1.8.7
3
3
  - 1.9.2
4
4
  - 1.9.3
5
- - jruby
5
+ - jruby-19mode
6
+ - jruby-18mode
7
+ - rbx-19mode
8
+ - rbx-18mode
6
9
  - ruby-head
7
10
  - ree
data/CONTRIBUTING.md CHANGED
@@ -8,22 +8,7 @@ Inheritance Module Eval is an open source project. Anyone can use the code, but
8
8
  * How to contribute fixes and improvements to the core
9
9
  * Information on how to improve the documentation
10
10
 
11
- 1. Who can Contribute?
12
- ----------------------
13
- Inheritance Module Eval is an open source project and as such contributions are always welcome. Our community is one which
14
- encourages involvement from all developers regardless of their ability level. We ask that you be patient with the
15
- other members of the community and maintain a respectful attitude towards other people’s work. Open source is a
16
- great way to learn a new technology so don’t be afraid to jump right in, even if you are new to Ruby/Rails.
17
-
18
- 2. Before you Contribute
19
- ------------------------
20
- Open source projects tend to be a collaborative effort. Since many people are relying upon Inheritance Module Eval for their real
21
- world applications, changes to the code can have major implications. Before you write a bug fix or code a new
22
- feature, you should find out if anybody is interested in your proposed change. You may find that the thing you’re
23
- trying to “fix” is actually desired behavior. You might also discover that someone else is working on it. Either
24
- way you can save yourself valuable time by announcing your intentions before starting work.
25
-
26
- ### 2.1. Notification via Ticket
11
+ ### Notification via Ticket
27
12
 
28
13
  You can also search existing bug reports/issues and file a new one if you do not find an issue relevant to your
29
14
  proposed change. See Filing an Issue for more details.
@@ -32,15 +17,12 @@ The important thing is that you communicate your intention in advance of doing a
32
17
  non-controversial changes do not require this approach but you can save some time by suggesting an improvement and
33
18
  having it rejected before you write a bunch of the code.
34
19
 
35
- 3. Filing an Issue
36
- -----------------
20
+ ## Filing an Issue
21
+
37
22
  If you would like to file a bug report, please create an issue in our Github Issues Tracker. You should do a basic
38
23
  search of the issues database before creating a new issue to ensure that you are not creating a duplicate issue.
39
24
 
40
- Please do not assign labels or create new labels to your issue. We will assign the appropriate labels to ensure your
41
- ticket is handled in the appropriate manner.
42
-
43
- ### 3.1. Providing a Patch
25
+ ### Providing a Patch
44
26
 
45
27
  If you are filing and issue and supplying a patch at the same time, please file a Pull Request instead. The pull
46
28
  request will also create an issue at the same time but its superior to just creating an issue because the code and
@@ -56,37 +38,15 @@ If the ticket already exists, however, and you want to supply a patch after the
56
38
  Github will automatically detect this commit message when you push it and link the issue. Please see the detailed
57
39
  Github Issues blog post for more details.
58
40
 
59
- ### 3.2. Feature Requests
41
+ ### Feature Requests
60
42
 
61
- We’re interested in hearing your ideas for new features but creating feature requests in the Issue Tracker is not
62
- the proper way to ask for a feature. A feature request is any idea you have to improve the software experience that
43
+ We’re interested in hearing your ideas for new features. A feature request is any idea you have to improve the software experience that
63
44
  is not strictly related to a bug or error of omission.
64
45
 
65
46
  Feature requests that are accompanied by source code are always welcome. In this case you should read the next
66
47
  section on Creating a Pull Request.
67
48
 
68
- Feature requests without accompanying code will be closed. We simply cannot respond efficiently to feature requests
69
- through our Issue Tracker. If you want to suggest a feature, please use the mailing list or the user voice forum.
70
-
71
- ### 3.3. How We Prioritize Issues
72
-
73
- We try our best to respond to all of the questions and issues our users have. We use the following criteria to
74
- prioritize issues:
75
-
76
- * Does this bug effect the latest stable release?
77
- * Is there a patch associated with the issue?
78
- * Is ther a test included in the patch?
79
- * Has someone else verified the bug?
80
- * Are there details on how to reproduce the problem?
81
- * We give highest priority to issues where the answer is “yes” to all of these questions. Next highest priority is for
82
- issues that answer “yes” to most of these questions, particularly the first few criteria.
83
-
84
- You need to include a brief description of the problem and simple steps needed to reproduce it. If you fail to
85
- supply this minimum level of information your issue will likely be ignored.
86
-
87
-
88
- 4. Creating a Pull Request
89
- --------------------------
49
+ ## Creating a Pull Request
90
50
 
91
51
  If you are going to contribute code to the Inheritance Module Eval project, the best mechanism for doing this is to create a pull
92
52
  request in Github. If you’re unfamiliar with the general concept of pull requests you may want to read more on pull
@@ -94,7 +54,7 @@ If you are going to contribute code to the Inheritance Module Eval project, the
94
54
 
95
55
  If your code is associated with an existing issue then you can provide a patch instead of creating a pull request.
96
56
 
97
- ### 4.1. Creating a Fork
57
+ ### Creating a Fork
98
58
 
99
59
  The official Inheritance Module Eval source code is maintained in Github under the AlexParamonov/inheritance_module_eval
100
60
 
@@ -102,7 +62,7 @@ You simply need to “fork” the project and then start hacking.
102
62
 
103
63
  See the Github guide on creating forks for more details.
104
64
 
105
- ### 4.2. Topic Branches
65
+ ### Topic Branches
106
66
 
107
67
  Git branches are “cheap.” Creating branches in Git is incredibly easy and its an ideal way to isolate a specific set
108
68
  of changes. You may be fixing several things at one time but by keeping your changes isolated it will help us to
@@ -138,7 +98,7 @@ You should probably also clean up after yourself a little. The branch has been p
138
98
 
139
99
  $ git branch -D fix-css-for-error-flash
140
100
 
141
- ### 4.3. Including a Test
101
+ ### Including a Test
142
102
 
143
103
  Ideally your pull request will also include a test that verifies a bug (or the absence of the new feature) before
144
104
  your fix and also verifies proper functionality when you are finished. Please read the Testing Guide for more
@@ -146,7 +106,7 @@ Ideally your pull request will also include a test that verifies a bug (or the a
146
106
 
147
107
  Pull requests with tests are given top priority. Failure to include a test will likely delay acceptance of your patch.
148
108
 
149
- ### 4.4. Creating the Pull Request
109
+ ### Creating the Pull Request
150
110
 
151
111
  Once your code is ready to go and you have pushed your topic branch to Github then you are ready to create the pull
152
112
  request and notify the Inheritance Module Eval team that your contribution is ready. You do this by browsing your project in
@@ -156,6 +116,5 @@ Once your code is ready to go and you have pushed your topic branch to Github th
156
116
  The Github guide on pull requests describes this in more detail with screenshots if you’re still confused on this
157
117
  part.
158
118
 
159
- 5 Contributing to the Documentation
160
- -----------------------------------
119
+ ## Contributing to the Documentation
161
120
  Improvements to the documentation is encouraged.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 Alexander N Paramonov
1
+ Copyright (c) 2011-2012 Alexander N Paramonov
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4
4
  documentation files (the "Software"), to deal in the Software without restriction,
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  Inheritance module_eval
2
2
  =======================
3
- Allows to create methods with same name inside particular class/object by pushing them down by inheritance tree.
3
+ [![Build Status](https://secure.travis-ci.org/AlexParamonov/inheritance_module_eval.png)](http://travis-ci.org/AlexParamonov/inheritance_module_eval)
4
+ [![Gemnasium Build Status](https://gemnasium.com/AlexParamonov/inheritance_module_eval.png)](http://gemnasium.com/AlexParamonov/inheritance_module_eval)
5
+
6
+ Allows to create methods with same name inside particular class/object by pushing them down by inheritance tree.
4
7
  So method "field" may call other "field" in same class by calling super keyword instead of just redefine it.
5
8
 
6
9
  Installation
@@ -76,7 +79,10 @@ tested with Ruby
76
79
  * 1.8.7
77
80
  * 1.9.2
78
81
  * 1.9.3
79
- * jruby
82
+ * jruby-19mode
83
+ * jruby-18mode
84
+ * rbx-19mode
85
+ * rbx-18mode
80
86
  * ruby-head
81
87
  * ree
82
88
 
@@ -22,5 +22,4 @@ So method "field" may call other "field" in same class by calling super keyword
22
22
  # specify any dependencies here; for example:
23
23
  s.add_development_dependency "rspec", ">= 2.6"
24
24
  s.add_development_dependency "rake"
25
- # s.add_runtime_dependency "rest-client"
26
25
  end
@@ -1,3 +1,3 @@
1
1
  module InheritanceModuleEval
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -18,25 +18,18 @@ describe InheritanceModuleEval do
18
18
  }
19
19
  end
20
20
 
21
- it "should delegate to module_eval" do
22
- mock_module = mock(:mock_module)
23
- test_class.stub(:include)
24
- test_class.stub(:extend)
25
- Module.stub(:new).and_return(mock_module)
26
-
27
- mock_module.should_receive(:module_eval).once
28
- InheritanceModuleEval.instance_eval_on test_class, &say_hi_block
29
-
30
- mock_module.should_receive(:module_eval).once
31
- InheritanceModuleEval.class_eval_on test_class, &say_hi_block
32
- end
33
-
34
21
  describe "instance methods" do
22
+ it "should delegate to module_eval" do
23
+ test_class.stub(:include)
24
+ Module.any_instance.should_receive(:module_eval).once
25
+ InheritanceModuleEval.instance_eval_on test_class, &say_hi_block
26
+ end
27
+
35
28
  it "should eval a string" do
36
29
  InheritanceModuleEval.instance_eval_on test_class, say_hi_string
37
30
  test_class.new.should respond_to :say_hi
38
31
  end
39
-
32
+
40
33
  it "should eval a block" do
41
34
  InheritanceModuleEval.instance_eval_on test_class, &say_hi_block
42
35
  test_class.new.should respond_to :say_hi
@@ -44,11 +37,18 @@ describe InheritanceModuleEval do
44
37
  end
45
38
 
46
39
  describe "class_methods" do
40
+ it "should delegate to module_eval" do
41
+ test_class.stub(:extend)
42
+
43
+ Module.any_instance.should_receive(:module_eval).once
44
+ InheritanceModuleEval.class_eval_on test_class, &say_hi_block
45
+ end
46
+
47
47
  it "should eval a string" do
48
48
  InheritanceModuleEval.class_eval_on test_class, say_hi_string
49
49
  test_class.should respond_to :say_hi
50
50
  end
51
-
51
+
52
52
  it "should eval a block" do
53
53
  InheritanceModuleEval.class_eval_on test_class, &say_hi_block
54
54
  test_class.should respond_to :say_hi
@@ -144,7 +144,7 @@ describe InheritanceModuleEval do
144
144
  "hi from method" << ", " << super
145
145
  end
146
146
  end
147
-
147
+
148
148
  test_class.new.say_hi.should == "hi from method, hi from eval, hi from module"
149
149
  end
150
150
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inheritance_module_eval
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-13 00:00:00.000000000 Z
12
+ date: 2012-02-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &20407580 !ruby/object:Gem::Requirement
16
+ requirement: &18013760 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '2.6'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *20407580
24
+ version_requirements: *18013760
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &20407080 !ruby/object:Gem::Requirement
27
+ requirement: &18013280 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *20407080
35
+ version_requirements: *18013280
36
36
  description: ! 'Allows to create methods with same name inside particular class/object
37
37
  by pushing them down by inheritance tree.
38
38
 
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project: inheritance_module_eval
82
- rubygems_version: 1.8.13
82
+ rubygems_version: 1.8.10
83
83
  signing_key:
84
84
  specification_version: 3
85
85
  summary: inheritance safe module_eval.