cartoonist-comics 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@
6
6
  <tr>
7
7
  <td colspan="2">
8
8
  Title:<br />
9
- <input type="text" name="title" value="<%= SimpleTemplate[Setting[:default_title], :next_number => @next_number] %>" tabindex="1" />
9
+ <input type="text" name="title" value="<%= SimpleTemplate[Setting[:default_comic_title], :next_number => @next_number] %>" tabindex="1" />
10
10
  </td>
11
11
  </tr>
12
12
 
@@ -1,4 +1,8 @@
1
1
  en:
2
+ settings:
3
+ show:
4
+ settings:
5
+ default_comic_title: "Default Comic Title: "
2
6
  admin:
3
7
  comic:
4
8
  index:
@@ -0,0 +1,21 @@
1
+ class MoveComicTitleSetting < ActiveRecord::Migration
2
+ def up
3
+ return puts "Skipping MoveComicTitleSetting up migration" if ENV["SkipMoveComicTitleSetting"] == "true"
4
+ raise "Uh oh... default_comic_title already exists... run with environment variable SkipMoveComicTitleSetting=true to skip this migration." if Setting.where(:label => "default_comic_title").count > 0
5
+
6
+ Setting.where(:label => "default_title").each do |setting|
7
+ setting.label = "default_comic_title"
8
+ setting.save!
9
+ end
10
+ end
11
+
12
+ def down
13
+ return puts "Skipping MoveComicTitleSetting down migration" if ENV["SkipMoveComicTitleSetting"] == "true"
14
+ raise "Uh oh... default_title already exists... run with environment variable SkipMoveComicTitleSetting=true to skip this migration." if Setting.where(:label => "default_title").count > 0
15
+
16
+ Setting.where(:label => "default_comic_title").each do |setting|
17
+ setting.label = "default_title"
18
+ setting.save!
19
+ end
20
+ end
21
+ end
@@ -1,5 +1,9 @@
1
1
  module CartoonistComics
2
2
  class Engine < ::Rails::Engine
3
+ config.to_prepare do
4
+ Setting.define :default_comic_title, :order => 10
5
+ end
6
+
3
7
  Cartoonist::Entity.add :comic, "Comic"
4
8
  Cartoonist::Admin::Tab.add :comics, :url => "/admin/comic", :order => 0
5
9
  Cartoonist::RootPath.add :comics, "comic#index"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cartoonist-comics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,26 +9,25 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-25 00:00:00.000000000 Z
12
+ date: 2012-06-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cartoonist
16
- requirement: &18959360 !ruby/object:Gem::Requirement
16
+ requirement: &10915220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
20
20
  - !ruby/object:Gem::Version
21
- version: 0.0.11
21
+ version: 0.0.12
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *18959360
24
+ version_requirements: *10915220
25
25
  description: This core plugin for Cartoonist adds comics.
26
26
  email: reasonnumber@gmail.com
27
27
  executables: []
28
28
  extensions: []
29
29
  extra_rdoc_files: []
30
30
  files:
31
- - .gitignore
32
31
  - app/controllers/admin/comic_controller.rb
33
32
  - app/controllers/comic_controller.rb
34
33
  - app/helpers/admin/comic_helper.rb
@@ -45,6 +44,7 @@ files:
45
44
  - cartoonist-comics.gemspec
46
45
  - config/locales/en.yml
47
46
  - db/migrate/20120107035512_create_comics.rb
47
+ - db/migrate/20120606023300_move_comic_title_setting.rb
48
48
  - lib/cartoonist-comics.rb
49
49
  - lib/cartoonist-comics/engine.rb
50
50
  homepage: http://reasonnumber.com/cartoonist
data/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- *~
2
- /cartoonist-comics*.gem