dragonfly 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of dragonfly might be problematic. Click here for more details.

data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.7
1
+ 0.3.8
data/dragonfly.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dragonfly}
8
- s.version = "0.3.7"
8
+ s.version = "0.3.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mark Evans"]
@@ -81,21 +81,21 @@ For reference, the contents of the metal file is given below. You could do somet
81
81
  require 'dragonfly'
82
82
 
83
83
  # Configuration of the Dragonfly App
84
- Dragonfly::App[:images].configure_with(Dragonfly::RMagickConfiguration)
85
- Dragonfly::App[:images].configure do |c|
84
+ app = Dragonfly::App[:images]
85
+ app.configure_with(Dragonfly::RMagickConfiguration)
86
+ app.configure do |c|
86
87
  c.log = RAILS_DEFAULT_LOGGER
87
88
  c.datastore.configure do |d|
88
89
  d.root_path = "#{Rails.root}/public/system/dragonfly/#{Rails.env}"
89
90
  end
90
91
  c.url_handler.configure do |u|
91
- u.secret = '29205f3e01648d0966bd5b119cd53347390a9ba9'
92
- u.path_prefix = '/images'
92
+ u.secret = '42fb1c533022556651af59d2a4302f44b37491e5'
93
+ u.path_prefix = '/media'
93
94
  end
94
95
  end
95
96
 
96
97
  # The metal, for running the app
97
- app = Dragonfly::App[:images]
98
- Images = Rack::Builder.new do
98
+ ImageServer = Rack::Builder.new do
99
99
 
100
100
  # UNCOMMENT ME!!!
101
101
  # ... if you want to use super-dooper middleware 'rack-cache'
@@ -104,7 +104,7 @@ For reference, the contents of the metal file is given below. You could do somet
104
104
  # :verbose => true,
105
105
  # :metastore => 'file:/var/cache/rack/meta',
106
106
  # :entitystore => 'file:/var/cache/rack/body'
107
-
107
+
108
108
  run app
109
-
109
+
110
110
  end
@@ -4,9 +4,10 @@ class DragonflyAppGenerator < Rails::Generator::NamedBase
4
4
 
5
5
  def manifest
6
6
  app_name = plural_name
7
- metal_name = plural_name.camelize
8
- path_prefix = plural_name
9
7
  single_name = singular_name.singularize
8
+ metal_file = "#{single_name}_server"
9
+ metal_name = metal_file.camelize
10
+ path_prefix = 'media'
10
11
 
11
12
  record do |m|
12
13
  # The initializer
@@ -27,7 +28,7 @@ class DragonflyAppGenerator < Rails::Generator::NamedBase
27
28
  m.directory('app/metal')
28
29
  m.template(
29
30
  'metal_file.erb',
30
- "app/metal/#{plural_name}.rb",
31
+ "app/metal/#{metal_file}.rb",
31
32
  :assigns => {
32
33
  :app_name => app_name,
33
34
  :metal_name => metal_name,
@@ -3,8 +3,9 @@ require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Ra
3
3
  require 'dragonfly'
4
4
 
5
5
  # Configuration of the Dragonfly App
6
- Dragonfly::App[:<%= app_name %>].configure_with(Dragonfly::RMagickConfiguration)
7
- Dragonfly::App[:<%= app_name %>].configure do |c|
6
+ app = Dragonfly::App[:<%= app_name %>]
7
+ app.configure_with(Dragonfly::RMagickConfiguration)
8
+ app.configure do |c|
8
9
  c.log = RAILS_DEFAULT_LOGGER
9
10
  c.datastore.configure do |d|
10
11
  d.root_path = "#{Rails.root}/public/system/dragonfly/#{Rails.env}"
@@ -16,7 +17,6 @@ Dragonfly::App[:<%= app_name %>].configure do |c|
16
17
  end
17
18
 
18
19
  # The metal, for running the app
19
- app = Dragonfly::App[:<%= app_name %>]
20
20
  <%= metal_name %> = Rack::Builder.new do
21
21
 
22
22
  # UNCOMMENT ME!!!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragonfly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Evans