versionist 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,5 +11,11 @@ module Versionist
11
11
  @header_versions ||= Array.new
12
12
  @parameter_versions ||= Array.new
13
13
  end
14
+
15
+ def clear!
16
+ @versioning_strategies.clear
17
+ @default_version = nil
18
+ @header_versions.clear
19
+ end
14
20
  end
15
21
  end
@@ -45,3 +45,16 @@ module Versionist
45
45
  end
46
46
  end
47
47
  end
48
+
49
+ # Hook to clear versionist cached data when routes are reloaded
50
+ module Rails
51
+ class Application #:nodoc:
52
+ class RoutesReloader #:nodoc:
53
+ def reload_with_versionist!
54
+ Versionist.configuration.clear!
55
+ reload_without_versionist!
56
+ end
57
+ alias_method_chain :reload!, :versionist
58
+ end
59
+ end
60
+ end
@@ -1,3 +1,3 @@
1
1
  module Versionist
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -11,7 +11,7 @@ module Versionist
11
11
  @config = config
12
12
  @config.symbolize_keys!
13
13
  Versionist.configuration.versioning_strategies << self
14
- raise ArgumentError, "attempt set more than one default api version" if !Versionist.configuration.default_version.nil? && @config.has_key?(:default)
14
+ raise ArgumentError, "[VERSIONIST] attempt to set more than one default api version" if !Versionist.configuration.default_version.nil? && @config.has_key?(:default)
15
15
  if @config.has_key?(:default)
16
16
  Versionist.configuration.default_version = self
17
17
  @default = true
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: versionist
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brian Ploetz
@@ -10,11 +10,10 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-03-05 00:00:00 Z
13
+ date: 2012-03-16 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- prerelease: false
18
17
  requirement: &id001 !ruby/object:Gem::Requirement
19
18
  none: false
20
19
  requirements:
@@ -22,10 +21,10 @@ dependencies:
22
21
  - !ruby/object:Gem::Version
23
22
  version: "3.0"
24
23
  type: :runtime
24
+ prerelease: false
25
25
  version_requirements: *id001
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: awesome_print
28
- prerelease: false
29
28
  requirement: &id002 !ruby/object:Gem::Requirement
30
29
  none: false
31
30
  requirements:
@@ -33,10 +32,10 @@ dependencies:
33
32
  - !ruby/object:Gem::Version
34
33
  version: 1.0.2
35
34
  type: :development
35
+ prerelease: false
36
36
  version_requirements: *id002
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rake
39
- prerelease: false
40
39
  requirement: &id003 !ruby/object:Gem::Requirement
41
40
  none: false
42
41
  requirements:
@@ -44,10 +43,10 @@ dependencies:
44
43
  - !ruby/object:Gem::Version
45
44
  version: 0.9.2
46
45
  type: :development
46
+ prerelease: false
47
47
  version_requirements: *id003
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- prerelease: false
51
50
  requirement: &id004 !ruby/object:Gem::Requirement
52
51
  none: false
53
52
  requirements:
@@ -55,10 +54,10 @@ dependencies:
55
54
  - !ruby/object:Gem::Version
56
55
  version: 2.8.0
57
56
  type: :development
57
+ prerelease: false
58
58
  version_requirements: *id004
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: rspec-rails
61
- prerelease: false
62
61
  requirement: &id005 !ruby/object:Gem::Requirement
63
62
  none: false
64
63
  requirements:
@@ -66,10 +65,10 @@ dependencies:
66
65
  - !ruby/object:Gem::Version
67
66
  version: 2.8.0
68
67
  type: :development
68
+ prerelease: false
69
69
  version_requirements: *id005
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: generator_spec
72
- prerelease: false
73
72
  requirement: &id006 !ruby/object:Gem::Requirement
74
73
  none: false
75
74
  requirements:
@@ -77,10 +76,10 @@ dependencies:
77
76
  - !ruby/object:Gem::Version
78
77
  version: 0.8.4
79
78
  type: :development
79
+ prerelease: false
80
80
  version_requirements: *id006
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rails
83
- prerelease: false
84
83
  requirement: &id007 !ruby/object:Gem::Requirement
85
84
  none: false
86
85
  requirements:
@@ -88,10 +87,10 @@ dependencies:
88
87
  - !ruby/object:Gem::Version
89
88
  version: "3.0"
90
89
  type: :development
90
+ prerelease: false
91
91
  version_requirements: *id007
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: rdoc
94
- prerelease: false
95
94
  requirement: &id008 !ruby/object:Gem::Requirement
96
95
  none: false
97
96
  requirements:
@@ -99,10 +98,10 @@ dependencies:
99
98
  - !ruby/object:Gem::Version
100
99
  version: "3.11"
101
100
  type: :development
101
+ prerelease: false
102
102
  version_requirements: *id008
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: simplecov
105
- prerelease: false
106
105
  requirement: &id009 !ruby/object:Gem::Requirement
107
106
  none: false
108
107
  requirements:
@@ -110,6 +109,7 @@ dependencies:
110
109
  - !ruby/object:Gem::Version
111
110
  version: 0.5.4
112
111
  type: :development
112
+ prerelease: false
113
113
  version_requirements: *id009
114
114
  description: A plugin for versioning Rails 3 based RESTful APIs.
115
115
  email:
@@ -165,6 +165,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
165
  requirements:
166
166
  - - ">="
167
167
  - !ruby/object:Gem::Version
168
+ hash: 109145179474669592
169
+ segments:
170
+ - 0
168
171
  version: "0"
169
172
  required_rubygems_version: !ruby/object:Gem::Requirement
170
173
  none: false
@@ -178,6 +181,6 @@ rubyforge_project:
178
181
  rubygems_version: 1.8.17
179
182
  signing_key:
180
183
  specification_version: 3
181
- summary: versionist-0.1.1
184
+ summary: versionist-0.1.2
182
185
  test_files: []
183
186