framework_identificator 1.2.3 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -22,13 +22,13 @@ Or install it yourself as:
22
22
 
23
23
  require "pathname"
24
24
  FrameworkIdentificator.from(Pathname.new(File.join("projects", "my_project")))
25
- => #<Frameworks::Rails:0x007fddec3c1028 @source="/Users/zedtux/projects/my_project", @project_name="MyProject">
25
+ => #<FrameworkIdentificator::Frameworks::Rails:0x007fddec3c1028 @source="/Users/zedtux/projects/my_project", @project_name="MyProject">
26
26
 
27
27
  ### With a Git object
28
28
 
29
29
  require "git"
30
30
  FrameworkIdentificator.from(Git.clone("git@myhost.tld:my_project", "my_project"))
31
- => #<Frameworks::Rails:0x007fddec3aff30 @source="/Users/zedtux/projects/my_project", @project_name="MyProject">
31
+ => #<FrameworkIdentificator::Frameworks::Rails:0x007fddec3aff30 @source="/Users/zedtux/projects/my_project", @project_name="MyProject">
32
32
 
33
33
  ## Implemented
34
34
 
@@ -1,71 +1,73 @@
1
- module Frameworks
2
- class Rails
3
- # ~~~~ Attributes ~~~~
4
- attr_accessor :source, :routes_path, :project_name
1
+ module FrameworkIdentificator
2
+ module Frameworks
3
+ class Rails
4
+ # ~~~~ Attributes ~~~~
5
+ attr_accessor :source, :routes_path, :project_name
5
6
 
6
- # ~~~~ Class Methods ~~~~
7
- def self.recognized?(source)
8
- @source = source
7
+ # ~~~~ Class Methods ~~~~
8
+ def self.recognized?(source)
9
+ @source = source
9
10
 
10
- self.recognize_a_rails_project?
11
- end
11
+ self.recognize_a_rails_project?
12
+ end
12
13
 
13
- # ~~~~ Instance Methods ~~~~
14
- def initialize(*source)
15
- if self.source = source.first
16
- self.parse_source
14
+ # ~~~~ Instance Methods ~~~~
15
+ def initialize(*source)
16
+ if self.source = source.first
17
+ self.parse_source
18
+ end
17
19
  end
18
- end
19
20
 
20
- protected
21
+ protected
21
22
 
22
- def parse_source
23
- self.project_name = File.read(self.class.send(:routes_rb_path)).scan(/([A-z]+)::Application.routes.draw\sdo/).flatten.first
24
- end
23
+ def parse_source
24
+ self.project_name = File.read(self.class.send(:routes_rb_path)).scan(/([A-z]+)::Application.routes.draw\sdo/).flatten.first
25
+ end
25
26
 
26
- private
27
+ private
27
28
 
28
- def self.recognize_a_rails_project?
29
- (self.have_valid_rails_2_script_folder? ||
30
- self.have_valid_rails_3_script_folder?) &&
31
- self.have_valid_app_folder? &&
32
- self.have_valid_config_folder? &&
33
- self.have_rakefile?
34
- end
29
+ def self.recognize_a_rails_project?
30
+ (self.have_valid_rails_2_script_folder? ||
31
+ self.have_valid_rails_3_script_folder?) &&
32
+ self.have_valid_app_folder? &&
33
+ self.have_valid_config_folder? &&
34
+ self.have_rakefile?
35
+ end
35
36
 
36
- def self.have_valid_rails_2_script_folder?
37
- File.exists?(File.join(@source, "script", "console")) &&
38
- File.exists?(File.join(@source, "script", "dbconsole")) &&
39
- File.exists?(File.join(@source, "script", "generate")) &&
40
- File.exists?(File.join(@source, "script", "plugin")) &&
41
- File.exists?(File.join(@source, "script", "runner")) &&
42
- File.exists?(File.join(@source, "script", "server"))
43
- end
37
+ def self.have_valid_rails_2_script_folder?
38
+ File.exists?(File.join(@source, "script", "console")) &&
39
+ File.exists?(File.join(@source, "script", "dbconsole")) &&
40
+ File.exists?(File.join(@source, "script", "generate")) &&
41
+ File.exists?(File.join(@source, "script", "plugin")) &&
42
+ File.exists?(File.join(@source, "script", "runner")) &&
43
+ File.exists?(File.join(@source, "script", "server"))
44
+ end
44
45
 
45
- def self.have_valid_rails_3_script_folder?
46
- File.exists?(File.join(@source, "script", "rails"))
47
- end
46
+ def self.have_valid_rails_3_script_folder?
47
+ File.exists?(File.join(@source, "script", "rails"))
48
+ end
48
49
 
49
- def self.have_valid_app_folder?
50
- File.exists?(File.join(@source, "app", "controllers")) &&
51
- File.exists?(File.join(@source, "app", "models")) &&
52
- File.exists?(File.join(@source, "app", "views"))
53
- end
50
+ def self.have_valid_app_folder?
51
+ File.exists?(File.join(@source, "app", "controllers")) &&
52
+ File.exists?(File.join(@source, "app", "models")) &&
53
+ File.exists?(File.join(@source, "app", "views"))
54
+ end
54
55
 
55
- def self.have_valid_config_folder?
56
- File.exists?(File.join(@source, "config", "environments")) &&
57
- File.exists?(File.join(@source, "config", "environments", "development.rb")) &&
58
- File.exists?(File.join(@source, "config", "boot.rb")) &&
59
- File.exists?(File.join(@source, "config", "environment.rb")) &&
60
- File.exists?(self.send(:routes_rb_path))
61
- end
56
+ def self.have_valid_config_folder?
57
+ File.exists?(File.join(@source, "config", "environments")) &&
58
+ File.exists?(File.join(@source, "config", "environments", "development.rb")) &&
59
+ File.exists?(File.join(@source, "config", "boot.rb")) &&
60
+ File.exists?(File.join(@source, "config", "environment.rb")) &&
61
+ File.exists?(self.send(:routes_rb_path))
62
+ end
62
63
 
63
- def self.have_rakefile?
64
- File.exists?(File.join(@source, "Rakefile"))
65
- end
64
+ def self.have_rakefile?
65
+ File.exists?(File.join(@source, "Rakefile"))
66
+ end
66
67
 
67
- def self.routes_rb_path
68
- File.join(@source, "config", "routes.rb")
68
+ def self.routes_rb_path
69
+ File.join(@source, "config", "routes.rb")
70
+ end
69
71
  end
70
72
  end
71
73
  end
@@ -1,11 +1,13 @@
1
- module Frameworks
1
+ module FrameworkIdentificator
2
+ module Frameworks
2
3
 
3
- # Collect and return classes representing frameworks implemented into the Frameworks module
4
- def self.available
5
- Frameworks.constants.select{|klass|
6
- Frameworks.const_get(klass).is_a?(Class)
7
- }.collect{|klass_sym|
8
- eval("Frameworks::#{klass_sym.to_s}")
9
- }
4
+ # Collect and return classes representing frameworks implemented into the FrameworkIdentificator::Frameworks module
5
+ def self.available
6
+ FrameworkIdentificator::Frameworks.constants.select{|klass|
7
+ FrameworkIdentificator::Frameworks.const_get(klass).is_a?(Class)
8
+ }.collect{|klass_sym|
9
+ eval("FrameworkIdentificator::Frameworks::#{klass_sym.to_s}")
10
+ }
11
+ end
10
12
  end
11
13
  end
@@ -1,3 +1,3 @@
1
1
  module FrameworkIdentificator
2
- VERSION = "1.2.3"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -12,7 +12,7 @@ module FrameworkIdentificator
12
12
  source = source.class.name == "Git::Base" ? source.dir.path : source
13
13
 
14
14
  # Try to detect a Framework using the source
15
- Frameworks.available.detect do |framework|
15
+ FrameworkIdentificator::Frameworks.available.detect do |framework|
16
16
  return framework.new(source) if framework.recognized?(source)
17
17
  end
18
18
  end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- describe Frameworks::Rails do
3
+ describe FrameworkIdentificator::Frameworks::Rails do
4
4
 
5
5
  describe "Attributes" do
6
6
  it "should have an attribute :source" do
@@ -18,6 +18,6 @@ describe Frameworks::Rails do
18
18
  end
19
19
 
20
20
  describe "Class Methods" do
21
-
21
+
22
22
  end
23
23
  end
@@ -1,10 +1,10 @@
1
1
  require "spec_helper"
2
2
 
3
- describe Frameworks do
3
+ describe FrameworkIdentificator::Frameworks do
4
4
 
5
5
  describe "#available" do
6
- it "should return an array with Frameworks::Rails" do
7
- subject.available.should == [Frameworks::Rails]
6
+ it "should return an array with FrameworkIdentificator::Frameworks::Rails" do
7
+ subject.available.should == [FrameworkIdentificator::Frameworks::Rails]
8
8
  end
9
9
  end
10
10
 
@@ -21,22 +21,22 @@ describe FrameworkIdentificator do
21
21
  before { @repository_path = Pathname.new(File.join("projects", "my_rails_project")) }
22
22
  describe "for a Rails framework" do
23
23
  context "with script/rails" do
24
- before { Frameworks::Rails.stub(:have_valid_rails_3_script_folder?).and_return(true) }
24
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_rails_3_script_folder?).and_return(true) }
25
25
  context "with valid app/ folder" do
26
- before { Frameworks::Rails.stub(:have_valid_app_folder?).and_return(true) }
26
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_app_folder?).and_return(true) }
27
27
  context "with valid config/ folder" do
28
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
28
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
29
29
  context "with a Rakefile" do
30
30
  before do
31
- Frameworks::Rails.stub(:have_rakefile?).and_return(true)
32
- Frameworks::Rails.any_instance.stub(:parse_source).and_return(true)
31
+ FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true)
32
+ FrameworkIdentificator::Frameworks::Rails.any_instance.stub(:parse_source).and_return(true)
33
33
  @framework = subject.from(@repository_path)
34
34
  end
35
35
  it "should return not return a nil" do
36
36
  @framework.should_not be_nil
37
37
  end
38
38
  it "should return an instance of Frameworks::Rails" do
39
- @framework.class.should be Frameworks::Rails
39
+ @framework.class.should be FrameworkIdentificator::Frameworks::Rails
40
40
  end
41
41
  describe "instance" do
42
42
  describe "project_name" do
@@ -53,22 +53,22 @@ describe FrameworkIdentificator do
53
53
  end
54
54
  end
55
55
  context "without Rakefile" do
56
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
56
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
57
57
  it "should return false" do
58
58
  subject.from(@repository_path).should be_false
59
59
  end
60
60
  end
61
61
  end
62
62
  context "without valid config/ folder" do
63
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
63
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
64
64
  context "with a Rakefile" do
65
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
65
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
66
66
  it "should return false" do
67
67
  subject.from(@repository_path).should be_false
68
68
  end
69
69
  end
70
70
  context "without Rakefile" do
71
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
71
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
72
72
  it "should return false" do
73
73
  subject.from(@repository_path).should be_false
74
74
  end
@@ -76,32 +76,32 @@ describe FrameworkIdentificator do
76
76
  end
77
77
  end
78
78
  context "without valid app/ folder" do
79
- before { Frameworks::Rails.stub(:have_valid_app_folder?).and_return(false) }
79
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_app_folder?).and_return(false) }
80
80
  context "with valid config/ folder" do
81
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
81
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
82
82
  context "with a Rakefile" do
83
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
83
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
84
84
  it "should return false" do
85
85
  subject.from(@repository_path).should be_false
86
86
  end
87
87
  end
88
88
  context "without Rakefile" do
89
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
89
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
90
90
  it "should return false" do
91
91
  subject.from(@repository_path).should be_false
92
92
  end
93
93
  end
94
94
  end
95
95
  context "without valid config/ folder" do
96
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
96
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
97
97
  context "with a Rakefile" do
98
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
98
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
99
99
  it "should return false" do
100
100
  subject.from(@repository_path).should be_false
101
101
  end
102
102
  end
103
103
  context "without Rakefile" do
104
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
104
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
105
105
  it "should return false" do
106
106
  subject.from(@repository_path).should be_false
107
107
  end
@@ -110,34 +110,34 @@ describe FrameworkIdentificator do
110
110
  end
111
111
  end
112
112
  context "with script/rails" do
113
- before { Frameworks::Rails.stub(:have_valid_script_folder?).and_return(false) }
113
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_script_folder?).and_return(false) }
114
114
  context "with valid app/ folder" do
115
- before { Frameworks::Rails.stub(:have_valid_app_folder?).and_return(true) }
115
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_app_folder?).and_return(true) }
116
116
  context "with valid config/ folder" do
117
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
117
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
118
118
  context "with a Rakefile" do
119
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
119
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
120
120
  it "should return false" do
121
121
  subject.from(@repository_path).should be_false
122
122
  end
123
123
  end
124
124
  context "without Rakefile" do
125
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
125
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
126
126
  it "should return false" do
127
127
  subject.from(@repository_path).should be_false
128
128
  end
129
129
  end
130
130
  end
131
131
  context "without valid config/ folder" do
132
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
132
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
133
133
  context "with a Rakefile" do
134
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
134
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
135
135
  it "should return false" do
136
136
  subject.from(@repository_path).should be_false
137
137
  end
138
138
  end
139
139
  context "without Rakefile" do
140
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
140
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
141
141
  it "should return false" do
142
142
  subject.from(@repository_path).should be_false
143
143
  end
@@ -145,32 +145,32 @@ describe FrameworkIdentificator do
145
145
  end
146
146
  end
147
147
  context "without valid app/ folder" do
148
- before { Frameworks::Rails.stub(:have_valid_app_folder?).and_return(false) }
148
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_app_folder?).and_return(false) }
149
149
  context "with valid config/ folder" do
150
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
150
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
151
151
  context "with a Rakefile" do
152
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
152
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
153
153
  it "should return false" do
154
154
  subject.from(@repository_path).should be_false
155
155
  end
156
156
  end
157
157
  context "without Rakefile" do
158
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
158
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
159
159
  it "should return false" do
160
160
  subject.from(@repository_path).should be_false
161
161
  end
162
162
  end
163
163
  end
164
164
  context "without valid config/ folder" do
165
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
165
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
166
166
  context "with a Rakefile" do
167
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
167
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
168
168
  it "should return false" do
169
169
  subject.from(@repository_path).should be_false
170
170
  end
171
171
  end
172
172
  context "without Rakefile" do
173
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
173
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
174
174
  it "should return false" do
175
175
  subject.from(@repository_path).should be_false
176
176
  end
@@ -194,22 +194,22 @@ describe FrameworkIdentificator do
194
194
  end
195
195
  describe "for a Rails framework" do
196
196
  context "with script/ folder" do
197
- before { Frameworks::Rails.stub(:have_valid_rails_3_script_folder?).and_return(true) }
197
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_rails_3_script_folder?).and_return(true) }
198
198
  context "with valid app/ folder" do
199
- before { Frameworks::Rails.stub(:have_valid_app_folder?).and_return(true) }
199
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_app_folder?).and_return(true) }
200
200
  context "with valid config/ folder" do
201
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
201
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
202
202
  context "with a Rakefile" do
203
203
  before do
204
- Frameworks::Rails.stub(:have_rakefile?).and_return(true)
205
- Frameworks::Rails.any_instance.stub(:parse_source).and_return(true)
204
+ FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true)
205
+ FrameworkIdentificator::Frameworks::Rails.any_instance.stub(:parse_source).and_return(true)
206
206
  @framework = subject.from(@git_repository)
207
207
  end
208
208
  it "should return not return a nil" do
209
209
  @framework.should_not be_nil
210
210
  end
211
211
  it "should return an instance of Frameworks::Rails" do
212
- @framework.class.should be Frameworks::Rails
212
+ @framework.class.should be FrameworkIdentificator::Frameworks::Rails
213
213
  end
214
214
  describe "instance" do
215
215
  it "should respond to project_name" do
@@ -226,22 +226,22 @@ describe FrameworkIdentificator do
226
226
  end
227
227
  end
228
228
  context "without Rakefile" do
229
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
229
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
230
230
  it "should return false" do
231
231
  subject.from(@git_repository).should be_false
232
232
  end
233
233
  end
234
234
  end
235
235
  context "without valid config/ folder" do
236
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
236
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
237
237
  context "with a Rakefile" do
238
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
238
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
239
239
  it "should return false" do
240
240
  subject.from(@git_repository).should be_false
241
241
  end
242
242
  end
243
243
  context "without Rakefile" do
244
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
244
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
245
245
  it "should return false" do
246
246
  subject.from(@git_repository).should be_false
247
247
  end
@@ -249,32 +249,32 @@ describe FrameworkIdentificator do
249
249
  end
250
250
  end
251
251
  context "without valid app/ folder" do
252
- before { Frameworks::Rails.stub(:have_valid_app_folder?).and_return(false) }
252
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_app_folder?).and_return(false) }
253
253
  context "with valid config/ folder" do
254
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
254
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
255
255
  context "with a Rakefile" do
256
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
256
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
257
257
  it "should return false" do
258
258
  subject.from(@git_repository).should be_false
259
259
  end
260
260
  end
261
261
  context "without Rakefile" do
262
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
262
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
263
263
  it "should return false" do
264
264
  subject.from(@git_repository).should be_false
265
265
  end
266
266
  end
267
267
  end
268
268
  context "without valid config/ folder" do
269
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
269
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
270
270
  context "with a Rakefile" do
271
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
271
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
272
272
  it "should return false" do
273
273
  subject.from(@git_repository).should be_false
274
274
  end
275
275
  end
276
276
  context "without Rakefile" do
277
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
277
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
278
278
  it "should return false" do
279
279
  subject.from(@git_repository).should be_false
280
280
  end
@@ -283,34 +283,34 @@ describe FrameworkIdentificator do
283
283
  end
284
284
  end
285
285
  context "with script/rails" do
286
- before { Frameworks::Rails.stub(:have_valid_script_folder?).and_return(false) }
286
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_script_folder?).and_return(false) }
287
287
  context "with valid app/ folder" do
288
- before { Frameworks::Rails.stub(:have_valid_app_folder?).and_return(true) }
288
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_app_folder?).and_return(true) }
289
289
  context "with valid config/ folder" do
290
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
290
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
291
291
  context "with a Rakefile" do
292
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
292
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
293
293
  it "should return false" do
294
294
  subject.from(@git_repository).should be_false
295
295
  end
296
296
  end
297
297
  context "without Rakefile" do
298
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
298
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
299
299
  it "should return false" do
300
300
  subject.from(@git_repository).should be_false
301
301
  end
302
302
  end
303
303
  end
304
304
  context "without valid config/ folder" do
305
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
305
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
306
306
  context "with a Rakefile" do
307
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
307
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
308
308
  it "should return false" do
309
309
  subject.from(@git_repository).should be_false
310
310
  end
311
311
  end
312
312
  context "without Rakefile" do
313
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
313
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
314
314
  it "should return false" do
315
315
  subject.from(@git_repository).should be_false
316
316
  end
@@ -318,32 +318,32 @@ describe FrameworkIdentificator do
318
318
  end
319
319
  end
320
320
  context "without valid app/ folder" do
321
- before { Frameworks::Rails.stub(:have_valid_app_folder?).and_return(false) }
321
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_app_folder?).and_return(false) }
322
322
  context "with valid config/ folder" do
323
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
323
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(true) }
324
324
  context "with a Rakefile" do
325
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
325
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
326
326
  it "should return false" do
327
327
  subject.from(@git_repository).should be_false
328
328
  end
329
329
  end
330
330
  context "without Rakefile" do
331
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
331
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
332
332
  it "should return false" do
333
333
  subject.from(@git_repository).should be_false
334
334
  end
335
335
  end
336
336
  end
337
337
  context "without valid config/ folder" do
338
- before { Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
338
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_valid_config_folder?).and_return(false) }
339
339
  context "with a Rakefile" do
340
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
340
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(true) }
341
341
  it "should return false" do
342
342
  subject.from(@git_repository).should be_false
343
343
  end
344
344
  end
345
345
  context "without Rakefile" do
346
- before { Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
346
+ before { FrameworkIdentificator::Frameworks::Rails.stub(:have_rakefile?).and_return(false) }
347
347
  it "should return false" do
348
348
  subject.from(@git_repository).should be_false
349
349
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: framework_identificator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-21 00:00:00.000000000 Z
12
+ date: 2012-11-25 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Identify the used framework of a given project.
15
15
  email:
@@ -38,7 +38,6 @@ files:
38
38
  - spec/framework_identificator/frameworks_spec.rb
39
39
  - spec/framework_identificator_spec.rb
40
40
  - spec/spec_helper.rb
41
- - spec/support/webmocks.rb
42
41
  homepage: https://github.com/zedtux/framework_identificator
43
42
  licenses: []
44
43
  post_install_message:
@@ -53,7 +52,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
52
  version: '0'
54
53
  segments:
55
54
  - 0
56
- hash: -1485726918847766987
55
+ hash: 3322985382667891788
57
56
  required_rubygems_version: !ruby/object:Gem::Requirement
58
57
  none: false
59
58
  requirements:
@@ -62,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
61
  version: '0'
63
62
  segments:
64
63
  - 0
65
- hash: -1485726918847766987
64
+ hash: 3322985382667891788
66
65
  requirements: []
67
66
  rubyforge_project:
68
67
  rubygems_version: 1.8.24
@@ -77,4 +76,3 @@ test_files:
77
76
  - spec/framework_identificator/frameworks_spec.rb
78
77
  - spec/framework_identificator_spec.rb
79
78
  - spec/spec_helper.rb
80
- - spec/support/webmocks.rb
File without changes