framework_identificator 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,9 +20,7 @@ module Frameworks
20
20
  protected
21
21
 
22
22
  def parse_source
23
- self.project_name = File.open(self.class.send(:routes_rb_path)) do |file|
24
- file.readline.scan(/^([A-z]+).*do$/).flatten.first
25
- end
23
+ self.project_name = File.read(self.class.send(:routes_rb_path)).scan(/([A-z]+)::Application.routes.draw\sdo/).flatten.first
26
24
  end
27
25
 
28
26
  private
@@ -1,3 +1,3 @@
1
1
  module FrameworkIdentificator
2
- VERSION = "1.2.2"
2
+ VERSION = "1.2.3"
3
3
  end
@@ -214,7 +214,6 @@ describe FrameworkIdentificator do
214
214
  describe "instance" do
215
215
  it "should respond to project_name" do
216
216
  @framework.should respond_to(:project_name)
217
- puts "Project name: \"#{@framework.project_name}\""
218
217
  end
219
218
  describe "project_name" do
220
219
  context "with a project name \"MyRailsProject\"" do
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.2
4
+ version: 1.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -53,7 +53,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  segments:
55
55
  - 0
56
- hash: -376972895810058699
56
+ hash: -1485726918847766987
57
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  none: false
59
59
  requirements:
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  version: '0'
63
63
  segments:
64
64
  - 0
65
- hash: -376972895810058699
65
+ hash: -1485726918847766987
66
66
  requirements: []
67
67
  rubyforge_project:
68
68
  rubygems_version: 1.8.24