versionist 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ module Versionist
|
|
23
23
|
parser = YARD::Parser::SourceParser.parse_string(File.read("config/routes.rb"))
|
24
24
|
existing_routes = nil
|
25
25
|
parser.enumerator.first.traverse do |node|
|
26
|
-
existing_routes = node.source if node.type == :fcall && node.source =~ /api_version
|
26
|
+
existing_routes = node.source if node.type == :fcall && node.source =~ /api_version.*:?module\s*(=>|:)\s*("|')#{module_name_for_route(old_module_name)}("|')/
|
27
27
|
end
|
28
28
|
if !existing_routes.nil?
|
29
29
|
copied_routes = String.new(existing_routes)
|
@@ -12,7 +12,7 @@ module Versionist
|
|
12
12
|
raise "API module namespace #{module_name} doesn't exist. Please run \'rails generate versionist:new_api_version\' generator first" if !File.exists?("app/controllers/#{module_name_for_path(module_name)}")
|
13
13
|
template 'new_controller.rb', File.join("app", "controllers", "#{module_name_for_path(module_name)}", "#{file_name}_controller.rb")
|
14
14
|
|
15
|
-
api_version_block = /api_version
|
15
|
+
api_version_block = /api_version.*:?module\s*(=>|:)\s*("|')#{module_name_for_route(module_name)}("|')/
|
16
16
|
new_route = " resources :#{file_name}\n"
|
17
17
|
matching_version_blocks = File.readlines("config/routes.rb").grep(api_version_block)
|
18
18
|
if matching_version_blocks.empty?
|
data/lib/versionist/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: versionist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
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: 2013-08-
|
12
|
+
date: 2013-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -87,7 +87,8 @@ files:
|
|
87
87
|
- lib/versionist/versioning_strategy.rb
|
88
88
|
- lib/versionist.rb
|
89
89
|
homepage: https://github.com/bploetz/versionist
|
90
|
-
licenses:
|
90
|
+
licenses:
|
91
|
+
- MIT
|
91
92
|
post_install_message:
|
92
93
|
rdoc_options:
|
93
94
|
- --charset=UTF-8
|
@@ -110,6 +111,6 @@ rubyforge_project:
|
|
110
111
|
rubygems_version: 1.8.25
|
111
112
|
signing_key:
|
112
113
|
specification_version: 3
|
113
|
-
summary: versionist-1.2.
|
114
|
+
summary: versionist-1.2.1
|
114
115
|
test_files: []
|
115
116
|
has_rdoc:
|