tanraya-playmo 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,3 @@
1
- #require "tanraya_playmo/version"
2
1
  require "playmo"
3
2
 
4
3
  module TanrayaPlaymo
@@ -9,5 +8,9 @@ module TanrayaPlaymo
9
8
  #cookbook.delete_all
10
9
 
11
10
  # Load custom recipes
12
- Dir["#{File.dirname(__FILE__)}/../recipes/*_recipe.rb"].each { |f| require f }
11
+ $:.unshift File.expand_path('../../recipes', __FILE__)
12
+
13
+ Dir[File.expand_path('../../recipes/*_recipe.rb', __FILE__).to_s].each do |f|
14
+ require f
15
+ end
13
16
  end
@@ -1,3 +1,3 @@
1
1
  module TanrayaPlaymo
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -2,7 +2,7 @@ recipe :appgems do
2
2
  description 'This will add necessary gems into your app'
3
3
  after :dragonfly
4
4
 
5
- silenly do
5
+ silently do
6
6
  # see https://github.com/sj26/mailcatcher
7
7
  gem 'mailcatcher', '0.5.1', :group => :development
8
8
 
@@ -29,5 +29,4 @@ recipe :appgems do
29
29
  gsub_file 'Gemfile', /^\s{2}gem 'sass-rails'.+$/, ''
30
30
  gem 'sass-rails', '3.1.5'
31
31
  end
32
- end
33
-
32
+ end
@@ -2,7 +2,7 @@ recipe :devise_views do
2
2
  description 'This will add customized Devise views into your app'
3
3
  after :mailer_layout
4
4
 
5
- silenly do
5
+ silently do
6
6
  remove_directory 'app/views/devise'
7
7
  copy_directory 'views/devise', 'app/views/devise'
8
8
  end
@@ -7,16 +7,19 @@ recipe :dragonfly do
7
7
  gem 'rack-cache', :require => 'rack/cache'
8
8
 
9
9
  # Create initializer
10
- create_file 'config/initializers/dragonfly.rb', <<-CONTENT.gsub(/^ {6}/, '')
11
- require 'dragonfly/rails/images'
12
- CONTENT
10
+ create_file 'config/initializers/dragonfly.rb' do
11
+ <<-CONTENT.gsub(/^ {6}/, '')
12
+ require 'dragonfly/rails/images'
13
+ CONTENT
14
+ end
13
15
 
14
16
  # Create Image model?
15
17
  #ask "Create polymorphic Image model?" do
16
18
  # Create migration
17
19
  filename = "db/migrate/#{(Time.now).strftime("%Y%m%d%H%M%S")}_create_images.rb"
18
20
 
19
- create_file filename, <<-CONTENT.gsub(/^ {8}/, '')
21
+ create_file filename do
22
+ <<-CONTENT.gsub(/^ {8}/, '')
20
23
  class CreateImages < ActiveRecord::Migration
21
24
  def change
22
25
  create_table :images do |t|
@@ -33,9 +36,11 @@ recipe :dragonfly do
33
36
  end
34
37
  end
35
38
  CONTENT
39
+ end
36
40
 
37
41
  # Create polymorphic Image model
38
- create_file 'app/models/image.rb', <<-CONTENT.gsub(/^ {8}/, '')
42
+ create_file 'app/models/image.rb' do
43
+ <<-CONTENT.gsub(/^ {8}/, '')
39
44
  # Polymorphic Image model that works with Dragonfly gem.
40
45
  #
41
46
  # = How to associate this model with another?
@@ -77,6 +82,7 @@ recipe :dragonfly do
77
82
  default_scope order(:updated_at)
78
83
  end
79
84
  CONTENT
85
+ end
80
86
 
81
87
  # TODO Add this into deploy.rb
82
88
  install do
@@ -93,26 +99,25 @@ recipe :dragonfly do
93
99
 
94
100
  after 'deploy:update_code', 'dragonfly:symlink'
95
101
  CONTENT
102
+ end
96
103
 
97
- append_file 'db/seebs.rb' do
98
- <<-CONTENT.gsub(/^ {12}/, '')
104
+ append_file 'db/seebs.rb' do
105
+ <<-CONTENT.gsub(/^ {12}/, '')
99
106
 
100
- # Example of how to add images to imageable model:
101
- # def read_photo(photo)
102
- # return File.open(File.join(File.dirname(__FILE__), "seeds", "photos", photo), "rb")
103
- # end
107
+ # Example of how to add images to imageable model:
108
+ # def read_photo(photo)
109
+ # return File.open(File.join(File.dirname(__FILE__), "seeds", "photos", photo), "rb")
110
+ # end
104
111
 
105
- # u = Consultor.create!({:email => 'ohlobystin@example.com', :password => 'secret', :password_confirmation => 'secret'})
106
- # u.build_profile({:name => 'Иван Охлобыстин', :image_attributes => { :image => read_photo('ohlobystin.jpg')}})
107
- # u.roles << consultor_role
108
- # u.save!
109
-
110
- CONTENT
111
- end
112
+ # u = Consultor.create!({:email => 'ohlobystin@example.com', :password => 'secret', :password_confirmation => 'secret'})
113
+ # u.build_profile({:name => 'Ivan Ohlobystin', :image_attributes => { :image => read_photo('ohlobystin.jpg')}})
114
+ # u.roles << consultor_role
115
+ # u.save!
116
+
117
+ CONTENT
112
118
  end
113
119
 
114
120
  end
115
121
 
116
- #end
117
122
  end
118
123
  end
@@ -2,7 +2,7 @@ recipe :mailer_layout do
2
2
  description 'This will add mailer layout into your app'
3
3
  after :tableless
4
4
 
5
- silenly do
5
+ silently do
6
6
  copy_file 'mailer.html.erb', 'app/views/layouts/mailer.html.erb'
7
7
  end
8
8
  end
@@ -2,7 +2,7 @@ recipe :tableless do
2
2
  description 'This will add tableless model into your app'
3
3
  after :appgems
4
4
 
5
- silenly do
5
+ silently do
6
6
  empty_dir 'lib/models'
7
7
  copy_file 'tableless.rb', 'lib/models/tableless.rb'
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tanraya-playmo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playmo
16
- requirement: &17352400 !ruby/object:Gem::Requirement
16
+ requirement: &10137300 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 0.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17352400
24
+ version_requirements: *10137300
25
25
  description: This just only for my purposes
26
26
  email:
27
27
  - andrew@tanraya.com