nimbleshop_core 0.0.1.rc5 → 0.0.1.rc6
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.
- data/lib/generators/nimbleshop/app/app_generator.rb +5 -4
- data/lib/nimbleshop/version.rb +1 -1
- data/lib/nimbleshop_core.rb +3 -3
- data/lib/tasks/setup.rake +20 -17
- data/test/test_helper.rb +1 -1
- metadata +1 -1
@@ -20,7 +20,8 @@ module Nimbleshop
|
|
20
20
|
protected
|
21
21
|
|
22
22
|
def delete_public_index_html
|
23
|
-
|
23
|
+
index_file = destination_path.join('public', 'index.html')
|
24
|
+
FileUtils.rm(index_file) if File.exists? index_file
|
24
25
|
end
|
25
26
|
|
26
27
|
def mount
|
@@ -47,8 +48,8 @@ module Nimbleshop
|
|
47
48
|
|
48
49
|
def migrate_database!
|
49
50
|
puts 'coping migration files'
|
50
|
-
run 'bundle exec rake railties:install:migrations
|
51
|
-
run 'bundle exec rake db:create db:migrate
|
51
|
+
run 'bundle exec rake railties:install:migrations'
|
52
|
+
run 'bundle exec rake db:create db:migrate'
|
52
53
|
end
|
53
54
|
|
54
55
|
def bundle!
|
@@ -77,7 +78,7 @@ module Nimbleshop
|
|
77
78
|
end
|
78
79
|
|
79
80
|
def seed_database!
|
80
|
-
rake 'db:seed
|
81
|
+
rake 'db:seed'
|
81
82
|
end
|
82
83
|
|
83
84
|
end
|
data/lib/nimbleshop/version.rb
CHANGED
data/lib/nimbleshop_core.rb
CHANGED
@@ -3,9 +3,9 @@ require 'generators/nimbleshop/app/app_generator'
|
|
3
3
|
|
4
4
|
# Why do we need to require all the gems individually ?
|
5
5
|
#
|
6
|
-
# When bundler loads a gem
|
7
|
-
# nimbleshop_core gem is loaded using gemspec and
|
8
|
-
# autoload
|
6
|
+
# When bundler loads a gem it also requires that gem unless you say require false.
|
7
|
+
# nimbleshop_core gem is loaded using gemspec and unlike bundler gemspec does not
|
8
|
+
# autoload the gems.
|
9
9
|
|
10
10
|
require 'rails/all'
|
11
11
|
require 'hashr'
|
data/lib/tasks/setup.rake
CHANGED
@@ -1,26 +1,29 @@
|
|
1
1
|
namespace :nimbleshop do
|
2
2
|
|
3
|
-
|
4
|
-
task :setup => :environment do
|
3
|
+
namespace :setup do
|
5
4
|
|
6
|
-
|
5
|
+
desc "sets up database for nimbleshop application"
|
6
|
+
task :db => :environment do
|
7
7
|
|
8
|
-
|
8
|
+
#raise "this task should not be run in production" if Rails.env.production?
|
9
9
|
|
10
|
-
|
10
|
+
Rake::Task["db:reset"].invoke if Rails.env.development? || Rails.env.test?
|
11
11
|
|
12
|
-
|
13
|
-
Rake::Task["nimbleshop_paypalwp:load_record"].invoke
|
14
|
-
Rake::Task["nimbleshop_authorizedotnet:load_record"].invoke
|
15
|
-
Rake::Task["nimbleshop_cod:load_record"].invoke
|
12
|
+
Sampledata::Data.new.populate
|
16
13
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
14
|
+
Rake::Task["nimbleshop_splitable:load_record"].invoke
|
15
|
+
Rake::Task["nimbleshop_paypalwp:load_record"].invoke
|
16
|
+
Rake::Task["nimbleshop_authorizedotnet:load_record"].invoke
|
17
|
+
Rake::Task["nimbleshop_cod:load_record"].invoke
|
21
18
|
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
Rake::Task["nimbleshop_splitable:copy_images"].invoke
|
20
|
+
Rake::Task["nimbleshop_paypalwp:copy_images"].invoke
|
21
|
+
Rake::Task["nimbleshop_authorizedotnet:copy_images"].invoke
|
22
|
+
Rake::Task["nimbleshop_cod:copy_images"].invoke
|
25
23
|
|
26
|
-
|
24
|
+
puts ""
|
25
|
+
puts '**** shop is ready with sample data ****'
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
data/test/test_helper.rb
CHANGED
@@ -2,7 +2,7 @@ require 'bundler'
|
|
2
2
|
Bundler.setup(:test)
|
3
3
|
|
4
4
|
ENV["RAILS_ENV"] = "test"
|
5
|
-
require File.expand_path("../../../
|
5
|
+
require File.expand_path("../../../myshop_test/config/environment.rb", __FILE__)
|
6
6
|
require 'rails/test_help'
|
7
7
|
require 'capybara/rails'
|
8
8
|
|