spree_clean 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ # Because this is a gem, ignore Gemfile.lock:
2
+
3
+ Gemfile.lock
4
+
5
+ # And because this is Ruby, ignore the following
6
+ # (source: https://github.com/github/gitignore/blob/master/Ruby.gitignore):
7
+
8
+ *.gem
9
+ *.rbc
10
+ .bundle
11
+ .config
12
+ coverage
13
+ InstalledFiles
14
+ lib/bundler/man
15
+ pkg
16
+ rdoc
17
+ spec/dummy
18
+ spec/reports
19
+ test/tmp
20
+ test/version_tmp
21
+ tmp
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source 'http://rubygems.org'
2
+
3
+ group :test do
4
+ gem 'ffaker'
5
+ end
6
+
7
+ if RUBY_VERSION < "1.9"
8
+ gem "ruby-debug"
9
+ else
10
+ gem "ruby-debug19"
11
+ end
12
+
13
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,225 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ spree_clean (1.0.4)
5
+ spree_core (~> 1.2.0)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ actionmailer (3.2.8)
11
+ actionpack (= 3.2.8)
12
+ mail (~> 2.4.4)
13
+ actionpack (3.2.8)
14
+ activemodel (= 3.2.8)
15
+ activesupport (= 3.2.8)
16
+ builder (~> 3.0.0)
17
+ erubis (~> 2.7.0)
18
+ journey (~> 1.0.4)
19
+ rack (~> 1.4.0)
20
+ rack-cache (~> 1.2)
21
+ rack-test (~> 0.6.1)
22
+ sprockets (~> 2.1.3)
23
+ active_utils (1.0.5)
24
+ activesupport (>= 2.3.11)
25
+ i18n
26
+ activemerchant (1.28.0)
27
+ active_utils (>= 1.0.2)
28
+ activesupport (>= 2.3.11)
29
+ builder (>= 2.0.0)
30
+ i18n
31
+ json (>= 1.5.1)
32
+ money
33
+ nokogiri
34
+ activemodel (3.2.8)
35
+ activesupport (= 3.2.8)
36
+ builder (~> 3.0.0)
37
+ activerecord (3.2.8)
38
+ activemodel (= 3.2.8)
39
+ activesupport (= 3.2.8)
40
+ arel (~> 3.0.2)
41
+ tzinfo (~> 0.3.29)
42
+ activeresource (3.2.8)
43
+ activemodel (= 3.2.8)
44
+ activesupport (= 3.2.8)
45
+ activesupport (3.2.8)
46
+ i18n (~> 0.6)
47
+ multi_json (~> 1.0)
48
+ acts_as_list (0.1.4)
49
+ addressable (2.2.7)
50
+ archive-tar-minitar (0.5.2)
51
+ arel (3.0.2)
52
+ aws-sdk (1.3.9)
53
+ httparty (~> 0.7)
54
+ json (~> 1.4)
55
+ nokogiri (>= 1.4.4)
56
+ uuidtools (~> 2.1)
57
+ builder (3.0.3)
58
+ cancan (1.6.7)
59
+ capybara (1.0.1)
60
+ mime-types (>= 1.16)
61
+ nokogiri (>= 1.3.3)
62
+ rack (>= 1.0.0)
63
+ rack-test (>= 0.5.4)
64
+ selenium-webdriver (~> 2.0)
65
+ xpath (~> 0.1.4)
66
+ childprocess (0.3.2)
67
+ ffi (~> 1.0.6)
68
+ cocaine (0.3.0)
69
+ columnize (0.3.6)
70
+ deface (0.9.1)
71
+ nokogiri (~> 1.5.0)
72
+ rails (~> 3.1)
73
+ diff-lcs (1.1.3)
74
+ erubis (2.7.0)
75
+ factory_girl (4.1.0)
76
+ activesupport (>= 3.0.0)
77
+ ffaker (1.12.1)
78
+ ffi (1.0.11)
79
+ highline (1.6.11)
80
+ hike (1.2.1)
81
+ httparty (0.9.0)
82
+ multi_json (~> 1.0)
83
+ multi_xml
84
+ i18n (0.6.1)
85
+ journey (1.0.4)
86
+ jquery-rails (2.1.2)
87
+ railties (>= 3.1.0, < 5.0)
88
+ thor (~> 0.14)
89
+ json (1.7.5)
90
+ kaminari (0.14.1)
91
+ actionpack (>= 3.0.0)
92
+ activesupport (>= 3.0.0)
93
+ libwebsocket (0.1.3)
94
+ addressable
95
+ linecache19 (0.5.12)
96
+ ruby_core_source (>= 0.1.4)
97
+ mail (2.4.4)
98
+ i18n (>= 0.4.0)
99
+ mime-types (~> 1.16)
100
+ treetop (~> 1.4.8)
101
+ mime-types (1.18)
102
+ money (5.0.0)
103
+ i18n (~> 0.4)
104
+ json
105
+ multi_json (1.3.6)
106
+ multi_xml (0.5.1)
107
+ nested_set (1.7.0)
108
+ activerecord (>= 3.0.0)
109
+ railties (>= 3.0.0)
110
+ nokogiri (1.5.2)
111
+ paperclip (2.7.0)
112
+ activerecord (>= 2.3.0)
113
+ activesupport (>= 2.3.2)
114
+ cocaine (>= 0.0.2)
115
+ mime-types
116
+ polyamorous (0.5.0)
117
+ activerecord (~> 3.0)
118
+ polyglot (0.3.3)
119
+ rack (1.4.1)
120
+ rack-cache (1.2)
121
+ rack (>= 0.4)
122
+ rack-ssl (1.3.2)
123
+ rack
124
+ rack-test (0.6.1)
125
+ rack (>= 1.0)
126
+ rails (3.2.8)
127
+ actionmailer (= 3.2.8)
128
+ actionpack (= 3.2.8)
129
+ activerecord (= 3.2.8)
130
+ activeresource (= 3.2.8)
131
+ activesupport (= 3.2.8)
132
+ bundler (~> 1.0)
133
+ railties (= 3.2.8)
134
+ railties (3.2.8)
135
+ actionpack (= 3.2.8)
136
+ activesupport (= 3.2.8)
137
+ rack-ssl (~> 1.3.2)
138
+ rake (>= 0.8.7)
139
+ rdoc (~> 3.4)
140
+ thor (>= 0.14.6, < 2.0)
141
+ rake (0.9.2.2)
142
+ ransack (0.7.0)
143
+ actionpack (~> 3.0)
144
+ activerecord (~> 3.0)
145
+ polyamorous (~> 0.5.0)
146
+ rdoc (3.12)
147
+ json (~> 1.4)
148
+ rspec (2.11.0)
149
+ rspec-core (~> 2.11.0)
150
+ rspec-expectations (~> 2.11.0)
151
+ rspec-mocks (~> 2.11.0)
152
+ rspec-core (2.11.1)
153
+ rspec-expectations (2.11.3)
154
+ diff-lcs (~> 1.1.3)
155
+ rspec-mocks (2.11.2)
156
+ rspec-rails (2.11.0)
157
+ actionpack (>= 3.0)
158
+ activesupport (>= 3.0)
159
+ railties (>= 3.0)
160
+ rspec (~> 2.11.0)
161
+ ruby-debug-base19 (0.11.25)
162
+ columnize (>= 0.3.1)
163
+ linecache19 (>= 0.5.11)
164
+ ruby_core_source (>= 0.1.4)
165
+ ruby-debug19 (0.11.6)
166
+ columnize (>= 0.3.1)
167
+ linecache19 (>= 0.5.11)
168
+ ruby-debug-base19 (>= 0.11.19)
169
+ ruby_core_source (0.1.5)
170
+ archive-tar-minitar (>= 0.5.2)
171
+ rubyzip (0.9.8)
172
+ select2-rails (0.0.9)
173
+ thor (~> 0.14)
174
+ selenium-webdriver (2.21.2)
175
+ childprocess (>= 0.2.5)
176
+ ffi (~> 1.0)
177
+ libwebsocket (~> 0.1.3)
178
+ multi_json (~> 1.0)
179
+ rubyzip
180
+ spree_core (1.2.0)
181
+ activemerchant (= 1.28.0)
182
+ acts_as_list (= 0.1.4)
183
+ aws-sdk (~> 1.3.4)
184
+ cancan (= 1.6.7)
185
+ deface (>= 0.9.0)
186
+ ffaker (~> 1.12.0)
187
+ highline (= 1.6.11)
188
+ jquery-rails (~> 2.0)
189
+ kaminari (>= 0.13.0)
190
+ money (= 5.0.0)
191
+ nested_set (= 1.7.0)
192
+ paperclip (~> 2.7)
193
+ rails (~> 3.2.8)
194
+ ransack (~> 0.7.0)
195
+ select2-rails (= 0.0.9)
196
+ state_machine (= 1.1.2)
197
+ stringex (~> 1.3.2)
198
+ sprockets (2.1.3)
199
+ hike (~> 1.2)
200
+ rack (~> 1.0)
201
+ tilt (~> 1.1, != 1.3.0)
202
+ sqlite3 (1.3.6)
203
+ state_machine (1.1.2)
204
+ stringex (1.3.3)
205
+ thor (0.16.0)
206
+ tilt (1.3.3)
207
+ treetop (1.4.10)
208
+ polyglot
209
+ polyglot (>= 0.3.1)
210
+ tzinfo (0.3.33)
211
+ uuidtools (2.1.3)
212
+ xpath (0.1.4)
213
+ nokogiri (~> 1.3)
214
+
215
+ PLATFORMS
216
+ ruby
217
+
218
+ DEPENDENCIES
219
+ capybara (= 1.0.1)
220
+ factory_girl
221
+ ffaker
222
+ rspec-rails (~> 2.11)
223
+ ruby-debug19
224
+ spree_clean!
225
+ sqlite3
data/LICENSE ADDED
@@ -0,0 +1,26 @@
1
+ Copyright (c) 2012 [name of plugin creator]
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification,
5
+ are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice,
8
+ this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright notice,
10
+ this list of conditions and the following disclaimer in the documentation
11
+ and/or other materials provided with the distribution.
12
+ * Neither the name Spree nor the names of its contributors may be used to
13
+ endorse or promote products derived from this software without specific
14
+ prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.md ADDED
@@ -0,0 +1,21 @@
1
+ Spree Clean
2
+ ==========
3
+
4
+ A Spree extension which facilitates easy deletion of application data. This includes both seed and sample data. This extension adds a new section to the Configurations menu on your store's admin.
5
+
6
+
7
+ Installation & Usage
8
+ =======
9
+
10
+ Add the following to your Gemfile
11
+
12
+ gem 'spree_clean', :git => "git://github.com/spree/spree_clean.git"
13
+
14
+ Next run bundle install followed by the install generator
15
+
16
+ rails generate spree_clean:install
17
+
18
+ Navigate to your store's admin and head to the Configurations menu. Follow the link to "Clean Data" and begin using the extension.
19
+
20
+
21
+ Copyright (c) 2012 John Dyer, released under the New BSD License
data/Rakefile ADDED
@@ -0,0 +1,29 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rake/packagetask'
4
+ require 'rubygems/package_task'
5
+ require 'rspec/core/rake_task'
6
+ require 'spree/core/testing_support/common_rake'
7
+
8
+ RSpec::Core::RakeTask.new
9
+
10
+ task :default => [:spec]
11
+
12
+ spec = eval(File.read('spree_clean.gemspec'))
13
+
14
+ Gem::PackageTask.new(spec) do |p|
15
+ p.gem_spec = spec
16
+ end
17
+
18
+ desc "Release to gemcutter"
19
+ task :release => :package do
20
+ require 'rake/gemcutter'
21
+ Rake::Gemcutter::Tasks.new(spec).define
22
+ Rake::Task['gem:push'].invoke
23
+ end
24
+
25
+ desc "Generates a dummy app for testing"
26
+ task :test_app do
27
+ ENV['LIB_NAME'] = 'spree_clean'
28
+ Rake::Task['common:test_app'].invoke
29
+ end
data/Versionfile ADDED
@@ -0,0 +1,3 @@
1
+ "1.2.x" => { :tag => "v1.0.4", :version => "1.0.4" }
2
+ "1.1.x" => { :tag => "v1.0.3", :version => "1.0.3" }
3
+ "1.0.x" => { :tag => "v1.0.2", :version => "1.0.2" }
@@ -0,0 +1,16 @@
1
+ $(document).ready(function() {
2
+ // select all
3
+ $("a[href='#select_all']").click(function() {
4
+ $(".resources-list input[type='checkbox']").attr('checked', true);
5
+ });
6
+
7
+ $("a[href='#select_none']").click(function() {
8
+ $(".resources-list input[type='checkbox']").attr('checked', false);
9
+ });
10
+
11
+ $("a[href='#invert_selection']").click(function() {
12
+ $(".resources-list input[type='checkbox']").each(function() {
13
+ $(this).attr('checked', !$(this).attr('checked'));
14
+ });
15
+ });
16
+ });
@@ -0,0 +1,2 @@
1
+ //= require admin/spree_core
2
+ //= require_tree .
@@ -0,0 +1 @@
1
+ //= require store/spree_core
@@ -0,0 +1,3 @@
1
+ /*
2
+ *= require admin/spree_core
3
+ */
@@ -0,0 +1,3 @@
1
+ /*
2
+ *= require store/spree_core
3
+ */
@@ -0,0 +1,21 @@
1
+ module Spree
2
+ module Admin
3
+ class CleanDataController < BaseController
4
+ def destroy_data
5
+ params[:resources].each_key do |resource|
6
+ case resource
7
+ when "user"
8
+ Spree::User.where('id NOT IN (SELECT user_id FROM spree_roles_users)').delete_all
9
+ when "address"
10
+ Spree::Address.delete_all
11
+ else
12
+ "Spree::#{resource.classify}".constantize.delete_all
13
+ end
14
+ end
15
+
16
+ flash[:notice] = "Selected data has been successfully deleted"
17
+ redirect_to admin_clean_data_path
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,5 @@
1
+ Deface::Override.new(:virtual_path => "spree/admin/configurations/index",
2
+ :name => "add_clean_data_to_configurations_menu",
3
+ :insert_after => "[data-hook='admin_configurations_menu']",
4
+ :partial => "spree/admin/shared/configurations_menu",
5
+ :disabled => false)
@@ -0,0 +1,102 @@
1
+ <%= render :partial => 'spree/admin/shared/configuration_menu' %>
2
+
3
+ <h1><%= t(:clean_data) %></h1>
4
+
5
+ <p class="warning"><strong><%= t :clean_data_warning %></strong></p>
6
+
7
+ <p>
8
+ <a href="#select_all">Select All</a> |
9
+ <a href="#select_none">Select None</a> |
10
+ <a href="#invert_selection">Invert Selection</a>
11
+ </p>
12
+
13
+ <%= form_tag admin_destroy_data_path, :method => :delete do %>
14
+ <p data-hook="resources-list" class="resources-list">
15
+ <%= label_tag 'resources[address]', t(:addresses) %>
16
+ <%= check_box_tag 'resources[address]', '1', true %>
17
+ <br />
18
+ <%= label_tag 'resources[adjustment]', t(:adjustments) %>
19
+ <%= check_box_tag 'resources[adjustment]', '1', true %>
20
+ <br />
21
+ <%= label_tag 'resources[asset]', t(:assets) %>
22
+ <%= check_box_tag 'resources[asset]', '1', true %>
23
+ <br />
24
+ <%= label_tag 'resources[calculator]', t(:calculators) %>
25
+ <%= check_box_tag 'resources[calculator]', '1', true %>
26
+ <br />
27
+ <%= label_tag 'resources[country]', t(:countries) %>
28
+ <%= check_box_tag 'resources[country]', '1', false %>
29
+ <br />
30
+ <%= label_tag 'resources[line_item]', t(:line_items) %>
31
+ <%= check_box_tag 'resources[line_item]', '1', true %>
32
+ <br />
33
+ <%= label_tag 'resources[option_type]', t(:option_types) %>
34
+ <%= check_box_tag 'resources[option_type]', '1', true %>
35
+ <br />
36
+ <%= label_tag 'resources[option_value]', t(:option_values) %>
37
+ <%= check_box_tag 'resources[option_value]', '1', true %>
38
+ <br />
39
+ <%= label_tag 'resources[order]', t(:orders) %>
40
+ <%= check_box_tag 'resources[order]', '1', true %>
41
+ <br />
42
+ <%= label_tag 'resources[payment_method]', t(:payment_methods) %>
43
+ <%= check_box_tag 'resources[payment_method]', '1', true %>
44
+ <br />
45
+ <%= label_tag 'resources[product_option_type]', t(:product_option_types) %>
46
+ <%= check_box_tag 'resources[product_option_type]', '1', true %>
47
+ <br />
48
+ <%= label_tag 'resources[product_property]', t(:product_properties) %>
49
+ <%= check_box_tag 'resources[product_property]', '1', true %>
50
+ <br />
51
+ <%= label_tag 'resources[product]', t(:products) %>
52
+ <%= check_box_tag 'resources[product]', '1', true %>
53
+ <br />
54
+ <%= label_tag 'resources[property]', t(:properties) %>
55
+ <%= check_box_tag 'resources[property]', '1', true %>
56
+ <br />
57
+ <%= label_tag 'resources[prototype]', t(:prototypes) %>
58
+ <%= check_box_tag 'resources[prototype]', '1', true %>
59
+ <br />
60
+ <%= label_tag 'resources[shipment]', t(:shipments) %>
61
+ <%= check_box_tag 'resources[shipment]', '1', true %>
62
+ <br />
63
+ <%= label_tag 'resources[shipping_category]', t(:shipping_categories) %>
64
+ <%= check_box_tag 'resources[shipping_category]', '1', true %>
65
+ <br />
66
+ <%= label_tag 'resources[shipping_method]', t(:shipping_methods) %>
67
+ <%= check_box_tag 'resources[shipping_method]', '1', true %>
68
+ <br />
69
+ <%= label_tag 'resources[state]', t(:states) %>
70
+ <%= check_box_tag 'resources[state]', '1', false %>
71
+ <br />
72
+ <%= label_tag 'resources[tax_category]', t(:tax_categories) %>
73
+ <%= check_box_tag 'resources[tax_category]', '1', true %>
74
+ <br />
75
+ <%= label_tag 'resources[tax_rate]', t(:tax_rates) %>
76
+ <%= check_box_tag 'resources[tax_rate]', '1', true %>
77
+ <br />
78
+ <%= label_tag 'resources[taxonomy]', t(:taxonomies) %>
79
+ <%= check_box_tag 'resources[taxonomy]', '1', true %>
80
+ <br />
81
+ <%= label_tag 'resources[taxon]', t(:taxons) %>
82
+ <%= check_box_tag 'resources[taxon]', '1', true %>
83
+ <br />
84
+ <%= label_tag 'resources[user]', t(:users) %>
85
+ <%= check_box_tag 'resources[user]', '1', true %>
86
+ <br />
87
+ <%= label_tag 'resources[variant]', t(:variants) %>
88
+ <%= check_box_tag 'resources[variant]', '1', true %>
89
+ <br />
90
+ <%= label_tag 'resources[zone_member]', t(:zone_members) %>
91
+ <%= check_box_tag 'resources[zone_member]', '1', false %>
92
+ <br />
93
+ <%= label_tag 'resources[zone]', t(:zones) %>
94
+ <%= check_box_tag 'resources[zone]', '1', false %>
95
+ </p>
96
+
97
+ <p class="form-buttons" data-hook="buttons">
98
+ <%= submit_tag t(:destroy_data), :confirm => "#{t(:confirm_delete_data)}" %>
99
+ <%= t(:or) %> <%= link_to t(:cancel), admin_configurations_path %>
100
+ </p>
101
+ <% end %>
102
+
@@ -0,0 +1,4 @@
1
+ <tr>
2
+ <td><%= link_to t("clean_data"), admin_clean_data_path %></td>
3
+ <td><%= t("clean_data_description") %></td>
4
+ </tr>
@@ -0,0 +1,9 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ clean_data_description: "Bulk delete data from your application."
6
+ clean_data_warning: "Warning: Any actions taken on this page will permanently delete data from the application. Use with caution!"
7
+ confirm_delete_data: "Are you sure you wish to continure? This operation cannot be undone."
8
+ destroy_data: "Destroy Data"
9
+ product_scopes_label: "Product Scopes"
data/config/routes.rb ADDED
@@ -0,0 +1,6 @@
1
+ Spree::Core::Engine.routes.append do
2
+ namespace :admin do
3
+ resource :clean_data
4
+ match "destroy_data" => "clean_data#destroy_data"
5
+ end
6
+ end
@@ -0,0 +1,9 @@
1
+ module SpreeClean
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ def add_javascripts
5
+ append_file "app/assets/javascripts/admin/all.js", "//= require admin/spree_clean\n"
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,20 @@
1
+ module SpreeClean
2
+ class Engine < Rails::Engine
3
+ engine_name 'spree_clean'
4
+
5
+ config.autoload_paths += %W(#{config.root}/lib)
6
+
7
+ # use rspec for tests
8
+ config.generators do |g|
9
+ g.test_framework :rspec
10
+ end
11
+
12
+ def self.activate
13
+ Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_decorator*.rb")) do |c|
14
+ Rails.configuration.cache_classes ? require(c) : load(c)
15
+ end
16
+ end
17
+
18
+ config.to_prepare &method(:activate).to_proc
19
+ end
20
+ end
@@ -0,0 +1,2 @@
1
+ require 'spree_core'
2
+ require 'spree_clean/engine'
data/script/rails ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ ENGINE_PATH = File.expand_path('../..', __FILE__)
5
+ load File.expand_path('../../spec/dummy/script/rails', __FILE__)
@@ -0,0 +1,32 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+
6
+ require 'rspec/rails'
7
+
8
+ # Requires supporting ruby files with custom matchers and macros, etc,
9
+ # in spec/support/ and its subdirectories.
10
+ Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
11
+
12
+ # Requires factories defined in spree_core
13
+ require 'spree/core/testing_support/factories'
14
+
15
+ RSpec.configure do |config|
16
+ # == Mock Framework
17
+ #
18
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
19
+ #
20
+ # config.mock_with :mocha
21
+ # config.mock_with :flexmock
22
+ # config.mock_with :rr
23
+ config.mock_with :rspec
24
+
25
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
26
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
27
+
28
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
29
+ # examples within a transaction, remove the following line or assign false
30
+ # instead of true.
31
+ config.use_transactional_fixtures = true
32
+ end
@@ -0,0 +1,26 @@
1
+ # encoding: UTF-8
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ Gem::Specification.new do |s|
4
+ s.platform = Gem::Platform::RUBY
5
+ s.name = 'spree_clean'
6
+ s.version = '1.0.4'
7
+ s.summary = 'Delete data via the Spree admin'
8
+ s.description = 'Spree Extension that facilitates mass deletion of application data'
9
+ s.required_ruby_version = '>= 1.8.7'
10
+
11
+ s.author = 'John Dyer'
12
+ s.email = 'jdyer@spreecommerce.com'
13
+ s.homepage = 'http://www.spreecommerce.com'
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.require_path = 'lib'
17
+ s.requirements << 'none'
18
+
19
+ s.add_dependency 'spree_core', '~> 1.2.0'
20
+
21
+ s.add_development_dependency 'capybara', '1.0.1'
22
+ s.add_development_dependency 'factory_girl'
23
+ s.add_development_dependency 'ffaker'
24
+ s.add_development_dependency 'rspec-rails', '~> 2.11'
25
+ s.add_development_dependency 'sqlite3'
26
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_clean
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
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-05-01 00:00:00.000000000 Z
12
+ date: 2012-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.1.0
21
+ version: 1.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 1.1.0
29
+ version: 1.2.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: capybara
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirements:
83
83
  - - ~>
84
84
  - !ruby/object:Gem::Version
85
- version: '2.7'
85
+ version: '2.11'
86
86
  type: :development
87
87
  prerelease: false
88
88
  version_requirements: !ruby/object:Gem::Requirement
@@ -90,7 +90,7 @@ dependencies:
90
90
  requirements:
91
91
  - - ~>
92
92
  - !ruby/object:Gem::Version
93
- version: '2.7'
93
+ version: '2.11'
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: sqlite3
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -112,7 +112,32 @@ email: jdyer@spreecommerce.com
112
112
  executables: []
113
113
  extensions: []
114
114
  extra_rdoc_files: []
115
- files: []
115
+ files:
116
+ - .gitignore
117
+ - .rspec
118
+ - Gemfile
119
+ - Gemfile.lock
120
+ - LICENSE
121
+ - README.md
122
+ - Rakefile
123
+ - Versionfile
124
+ - app/assets/javascripts/admin/clean_data/show.js
125
+ - app/assets/javascripts/admin/spree_clean.js
126
+ - app/assets/javascripts/store/spree_clean.js
127
+ - app/assets/stylesheets/admin/spree_clean.css
128
+ - app/assets/stylesheets/store/spree_clean.css
129
+ - app/controllers/spree/admin/clean_data_controller.rb
130
+ - app/overrides/admin_configuration_decorator.rb
131
+ - app/views/spree/admin/clean_data/show.html.erb
132
+ - app/views/spree/admin/shared/_configurations_menu.html.erb
133
+ - config/locales/en.yml
134
+ - config/routes.rb
135
+ - lib/generators/spree_clean/install/install_generator.rb
136
+ - lib/spree_clean.rb
137
+ - lib/spree_clean/engine.rb
138
+ - script/rails
139
+ - spec/spec_helper.rb
140
+ - spree_clean.gemspec
116
141
  homepage: http://www.spreecommerce.com
117
142
  licenses: []
118
143
  post_install_message:
@@ -134,9 +159,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
134
159
  requirements:
135
160
  - none
136
161
  rubyforge_project:
137
- rubygems_version: 1.8.21
162
+ rubygems_version: 1.8.23
138
163
  signing_key:
139
164
  specification_version: 3
140
165
  summary: Delete data via the Spree admin
141
166
  test_files: []
142
- has_rdoc: