cafepress_wrapper 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc
CHANGED
@@ -33,3 +33,42 @@ Runs great on Heroku.
|
|
33
33
|
|
34
34
|
* Write setup howto
|
35
35
|
* Remove rockclimbingshirts.com specific stuff and create generic pages
|
36
|
+
|
37
|
+
== EXAMPLE ==
|
38
|
+
|
39
|
+
* Create new rails project:
|
40
|
+
> rails new cpw_test
|
41
|
+
... bunch of rails output ...
|
42
|
+
> cd cpw_test
|
43
|
+
|
44
|
+
* Add the CafePress Wrapper gem by adding the following line to Gemfile
|
45
|
+
gem 'cafepress_wrapper'
|
46
|
+
|
47
|
+
* Install the gem
|
48
|
+
> bundle install
|
49
|
+
... bunch of output, make sure you see Installing/Using cafepress_wrapper ...
|
50
|
+
|
51
|
+
* Create database
|
52
|
+
> rake db:create
|
53
|
+
|
54
|
+
* Migrate database
|
55
|
+
> rake cafepress_wrapper:db:migrate
|
56
|
+
... lots o' output ...
|
57
|
+
|
58
|
+
* Copy over static assets and config file
|
59
|
+
> rake cafepress_wrapper:install:all
|
60
|
+
... list of files copied and where ...
|
61
|
+
|
62
|
+
* Remove default index.html
|
63
|
+
> rm public/index.html
|
64
|
+
|
65
|
+
* Start rails server
|
66
|
+
> rails server
|
67
|
+
|
68
|
+
* Open http://localhost:3000/ in your web browser
|
69
|
+
You should see a pretty blank page with just header/footer/menu
|
70
|
+
|
71
|
+
* Add a basic cafepress store by store id (humancrashpad for this example)
|
72
|
+
> rake cafepress_wrapper:add_store[humancrashpad]
|
73
|
+
|
74
|
+
* Refresh http://localhost:3000/
|
@@ -22,11 +22,15 @@ begin
|
|
22
22
|
Rails.configuration.cpw_photos_url = yaml_config['photos_url']
|
23
23
|
Rails.configuration.cpw_google_analytics = yaml_config['google_analytics']
|
24
24
|
rescue
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
begin
|
26
|
+
Rails.configuration.cpw_name = yaml_config['cpw_name']
|
27
|
+
Rails.configuration.cpw_title = yaml_config['cpw_title']
|
28
|
+
Rails.configuration.cpw_description = yaml_config['cpw_description']
|
29
|
+
Rails.configuration.cpw_photos_url = yaml_config['cpw_photos_url']
|
30
|
+
Rails.configuration.cpw_google_analytics = yaml_config['cpw_google_analytics']
|
31
|
+
rescue
|
32
|
+
#maybe config file hasn't been copied over yet via rake cafepress:install:assets
|
33
|
+
end
|
30
34
|
end
|
31
35
|
|
32
36
|
require 'rails/generators'
|
@@ -1,10 +1,6 @@
|
|
1
1
|
namespace :db do
|
2
2
|
namespace :migrate do
|
3
|
-
|
4
|
-
description << "and update db/schema.rb by invoking db:schema:dump."
|
5
|
-
description << "Target specific version with VERSION=x. Turn off output with VERBOSE=false."
|
6
|
-
|
7
|
-
desc description
|
3
|
+
desc "Migrate the database through scripts in vendor/plugins/cafepress_wrapper/lib/db/migrate"
|
8
4
|
task :cafepress_wrapper => :environment do
|
9
5
|
ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
|
10
6
|
ActiveRecord::Migrator.migrate(File.join(File.dirname(__FILE__),'../db/migrate/'), ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
|
@@ -14,6 +10,20 @@ namespace :db do
|
|
14
10
|
end
|
15
11
|
|
16
12
|
namespace :cafepress_wrapper do
|
13
|
+
namespace :db do
|
14
|
+
desc "Migrate the database through scripts in vendor/plugins/cafepress_wrapper/lib/db/migrate"
|
15
|
+
task :migrate => :environment do
|
16
|
+
Rake::Task['db:migrate:cafepress_wrapper'].invoke
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
desc 'Add a cafepress store'
|
21
|
+
task :add_store, [:store_id] => :environment do |t, args|
|
22
|
+
Store.load_cafepress_store_and_products(args.store_id)
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
|
17
27
|
desc "Reload all cafepress data"
|
18
28
|
task :reload_data => :environment do
|
19
29
|
Store.load_all_stores_cafepress_data
|
@@ -33,6 +43,15 @@ namespace :cafepress_wrapper do
|
|
33
43
|
Rails::Generators::Base.invoke 'install:copy_config_file'
|
34
44
|
Rails::Generators::Base.start
|
35
45
|
end
|
46
|
+
|
47
|
+
desc 'Copy images, javascripts, stylesheets, and configuration files'
|
48
|
+
task :all => :environment do
|
49
|
+
Rails::Generators::Base.invoke 'install:copy_images'
|
50
|
+
Rails::Generators::Base.invoke 'install:copy_javascripts'
|
51
|
+
Rails::Generators::Base.invoke 'install:copy_stylesheets'
|
52
|
+
Rails::Generators::Base.invoke 'install:copy_config_file'
|
53
|
+
Rails::Generators::Base.start
|
54
|
+
end
|
36
55
|
end
|
37
56
|
end
|
38
57
|
|
@@ -0,0 +1 @@
|
|
1
|
+
/* Customize your CafePress Wrapper site by adding CSS here */
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cafepress_wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors: []
|
13
13
|
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- public/images/front_bg.png
|
97
97
|
- public/images/header_bg.png
|
98
98
|
- public/javascripts/cafepress_wrapper.js
|
99
|
+
- public/stylesheets/application.css
|
99
100
|
- public/stylesheets/cafepress_wrapper.css
|
100
101
|
- MIT-LICENSE
|
101
102
|
- Rakefile
|