carter 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/carter.rb +1 -1
- data/lib/carter/rails/init.rb +10 -0
- metadata +4 -5
- data/init.rb +0 -1
- data/rails/init.rb +0 -7
data/lib/carter.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
if defined?(Rails)
|
2
|
+
ActiveRecord::Base.extend Carter::ActiveRecord::Cartable if defined?(ActiveRecord)
|
3
|
+
if Rails::VERSION::MAJOR == 3
|
4
|
+
require 'carter/engine'
|
5
|
+
else
|
6
|
+
require 'carter/routing'
|
7
|
+
ActionController::Routing::RouteSet::Mapper.send :include, Carter::Routing::MapperExtensions
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 1
|
10
|
+
version: 0.6.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Louis Gillies
|
@@ -160,7 +160,6 @@ files:
|
|
160
160
|
- generators/carter_generator.rb
|
161
161
|
- generators/carter_install_generator.rb
|
162
162
|
- generators/templates/migration.rb
|
163
|
-
- init.rb
|
164
163
|
- lib/carter.rb
|
165
164
|
- lib/carter/active_record/extensions.rb
|
166
165
|
- lib/carter/cart.rb
|
@@ -172,10 +171,10 @@ files:
|
|
172
171
|
- lib/carter/errors/multiple_cart_items_not_allowed.rb
|
173
172
|
- lib/carter/errors/setup_error.rb
|
174
173
|
- lib/carter/initializer.rb
|
174
|
+
- lib/carter/rails/init.rb
|
175
175
|
- lib/carter/routing.rb
|
176
176
|
- lib/carter/state_machine.rb
|
177
177
|
- lib/tasks/carter.rake
|
178
|
-
- rails/init.rb
|
179
178
|
- LICENSE.txt
|
180
179
|
- README.md
|
181
180
|
- spec/active_record/cart_item_spec.rb
|
data/init.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'rails/init.rb'
|
data/rails/init.rb
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
if defined?(Rails)
|
2
|
-
require 'carter/engine' if Rails::VERSION::MAJOR == 3
|
3
|
-
ActiveRecord::Base.extend Carter::ActiveRecord::Cartable if defined?(ActiveRecord)
|
4
|
-
require 'carter/routing'
|
5
|
-
ActionController::Routing::RouteSet::Mapper.send :include, Carter::Routing::MapperExtensions
|
6
|
-
end
|
7
|
-
|