gluttonberg-core 2.5 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,13 +10,9 @@ module Gluttonberg
10
10
  klass.class_eval do
11
11
  extend Model::ClassMethods
12
12
  include Model::InstanceMethods
13
-
14
- #class << self;
15
- cattr_accessor :localized, :localized_model, :localized_model_name, :localized_fields, :locale;
16
- #end
13
+ cattr_accessor :localized, :localized_model, :localized_model_name, :localized_fields, :locale;
17
14
  self.localized = false
18
15
  self.localized_fields = []
19
-
20
16
  end
21
17
  end
22
18
 
@@ -56,6 +52,9 @@ module Gluttonberg
56
52
  localized_properties = self.localized_model.column_names.reject { |p| exclusions.include? p }
57
53
  non_localized_properties = self.column_names.reject { |p| exclusions.include? p }
58
54
 
55
+ self.localized_model.attr_accessible :locale_id , :parent_id
56
+
57
+
59
58
  localized_properties.each do |prop|
60
59
  self.localized_fields << prop
61
60
  # Create the accessor that points to the localized version
@@ -196,8 +195,6 @@ module Gluttonberg
196
195
  end #create_localization
197
196
 
198
197
 
199
-
200
-
201
198
  private
202
199
 
203
200
  # Validates the current_localization. If it is invalid, it's errors
@@ -115,10 +115,10 @@ module Gluttonberg
115
115
  # Returns the URL for the specified image size.
116
116
 
117
117
  def url_for(name)
118
- if self.class.sizes.has_key? name
119
- filename = self.class.sizes[name][:filename]
120
- "/user_assets/#{asset_hash}/#{filename}.#{file_extension}"
121
- end
118
+ if self.class.sizes.has_key? name
119
+ filename = self.class.sizes[name][:filename]
120
+ "/user_assets/#{asset_hash}/#{filename}.#{file_extension}"
121
+ end
122
122
  end
123
123
 
124
124
  # Returns the public URL to the asset’s small thumbnail — relative
@@ -1,3 +1,3 @@
1
1
  module Gluttonberg
2
- VERSION = "2.5"
2
+ VERSION = "2.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gluttonberg-core
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.5'
4
+ version: 2.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-11-01 00:00:00.000000000 Z
15
+ date: 2012-11-06 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: authlogic
@@ -181,7 +181,7 @@ dependencies:
181
181
  requirements:
182
182
  - - '='
183
183
  - !ruby/object:Gem::Version
184
- version: 2.0.3
184
+ version: 1.0.4.20101004123327
185
185
  type: :runtime
186
186
  prerelease: false
187
187
  version_requirements: !ruby/object:Gem::Requirement
@@ -189,7 +189,7 @@ dependencies:
189
189
  requirements:
190
190
  - - '='
191
191
  - !ruby/object:Gem::Version
192
- version: 2.0.3
192
+ version: 1.0.4.20101004123327
193
193
  - !ruby/object:Gem::Dependency
194
194
  name: ruby-mp3info
195
195
  requirement: !ruby/object:Gem::Requirement
@@ -903,12 +903,7 @@ files:
903
903
  - config/locales/en_au.yml
904
904
  - config/locales/en_gb.yml
905
905
  - config/routes.rb
906
- - db/migrate/migrations
907
- - db/migrate/old_migrations/1_untitled.rb
908
- - db/migrate/old_migrations/20101110051141_version_tables.rb
909
- - db/migrate/old_migrations/20101110061505_add_state_column.rb
910
- - db/migrate/old_migrations/20101111002552_create_users.rb
911
- - db/migrate/old_migrations/2_asset_library.rb
906
+ - db/migrate/20121106025800_add_artist_and_link_to_assets.rb
912
907
  - lib/acts_as_versioned.rb
913
908
  - lib/audio_job.rb
914
909
  - lib/engine.rb
@@ -981,7 +976,6 @@ files:
981
976
  - lib/gluttonberg.rb
982
977
  - lib/pagination_list_link_renderer.rb
983
978
  - lib/rails/railties/tasks.rake
984
- - lib/version.rb
985
979
  - Rakefile
986
980
  - README
987
981
  homepage: http://gluttonberg.com
@@ -1 +0,0 @@
1
- Migrations have been moved into the Gluttonberg::Installer Generator.
@@ -1,147 +0,0 @@
1
- # SQLEditor export: Rails Migration
2
- # id columns are removed
3
- class Untitled < ActiveRecord::Migration
4
- def self.up
5
- create_table :gb_dialects do |t|
6
- t.column :code, :string, :limit => 15, :null => false
7
- t.column :name, :string, :limit => 70, :null => false
8
- t.column :default, :boolean, :default => false
9
- t.column :user_id, :integer
10
- end
11
-
12
- create_table :gb_rich_text_content_localizations do |t|
13
- t.column :created_at, :timestamp
14
- t.column :updated_at, :timestamp
15
- t.column :page_localization_id, :integer
16
- t.column :text, :text
17
- t.column :formatted_text, :text
18
- t.column :rich_text_content_id, :integer
19
- end
20
-
21
- #gb_dialects_gb_locales
22
- create_table :dialects_locales , :id => false do |t|
23
- t.column :locale_id, :integer, :null => false
24
- t.column :dialect_id, :integer, :null => false
25
- end
26
-
27
- create_table :gb_plain_text_content_localizations do |t|
28
- t.column :created_at, :timestamp
29
- t.column :updated_at, :timestamp
30
- t.column :page_localization_id, :integer
31
- t.column :text, :string, :limit => 255
32
- t.column :plain_text_content_id, :integer
33
- end
34
-
35
- create_table :gb_html_contents do |t|
36
- t.column :orphaned, :boolean, :default => false
37
- t.column :section_name, :string, :limit => 50
38
- t.column :created_at, :timestamp
39
- t.column :updated_at, :timestamp
40
- t.column :page_id, :integer
41
- end
42
-
43
- create_table :gb_html_content_localizations do |t|
44
- t.column :created_at, :timestamp
45
- t.column :updated_at, :timestamp
46
- t.column :text, :text
47
- t.column :html_content_id, :integer
48
- t.column :page_localization_id, :integer
49
- end
50
-
51
- create_table :gb_image_contents do |t|
52
- t.column :orphaned, :boolean, :default => false
53
- t.column :section_name, :string, :limit => 50
54
- t.column :created_at, :timestamp
55
- t.column :updated_at, :timestamp
56
- t.column :asset_id, :integer
57
- t.column :page_id, :integer
58
- end
59
-
60
- create_table :gb_users do |t|
61
- t.column :crypted_password, :string, :limit => 50
62
- t.column :salt, :string, :limit => 50
63
- t.column :name, :string, :limit => 100
64
- t.column :email, :string, :limit => 100
65
- t.column :is_super_admin, :boolean, :default => true
66
- end
67
-
68
- create_table :gb_locales do |t|
69
- t.column :name, :string, :limit => 70, :null => false
70
- t.column :slug, :string, :limit => 70, :null => false
71
- t.column :default, :boolean, :default => false
72
- t.column :locale_id, :integer
73
- t.column :user_id, :integer
74
- end
75
-
76
- create_table :gb_settings do |t|
77
- t.column :name, :string, :limit => 50, :null => false
78
- t.column :value, :text
79
- t.column :category, :integer, :default => 1
80
- t.column :row, :integer
81
- t.column :delete_able, :boolean, :default => true
82
- t.column :enabled, :boolean, :default => true
83
- t.column :help, :text
84
- end
85
-
86
- create_table :gb_page_localizations do |t|
87
- t.column :name, :string, :limit => 150
88
- t.column :navigation_label, :string, :limit => 100
89
- t.column :slug, :string, :limit => 50
90
- t.column :path, :string, :limit => 255
91
- t.column :created_at, :timestamp
92
- t.column :updated_at, :timestamp
93
- t.column :dialect_id, :integer
94
- t.column :locale_id, :integer
95
- t.column :page_id, :integer
96
- end
97
-
98
- create_table :gb_rich_text_contents do |t|
99
- t.column :orphaned, :boolean, :default => false
100
- t.column :section_name, :string, :limit => 50
101
- t.column :created_at, :timestamp
102
- t.column :updated_at, :timestamp
103
- t.column :page_id, :integer
104
- end
105
-
106
- create_table :gb_pages do |t|
107
- t.column :parent_id, :integer
108
- t.column :name, :string, :limit => 100
109
- t.column :navigation_label, :string, :limit => 100
110
- t.column :slug, :string, :limit => 100
111
- t.column :description_name, :string, :limit => 100
112
- t.column :home, :boolean, :default => false
113
- t.column :depth, :integer, :default => 0
114
- t.column :created_at, :timestamp
115
- t.column :updated_at, :timestamp
116
- t.column :position, :integer
117
- #t.column :page_id, :integer
118
- t.column :user_id, :integer
119
- end
120
-
121
- create_table :gb_plain_text_contents do |t|
122
- t.column :orphaned, :boolean, :default => false
123
- t.column :section_name, :string, :limit => 50
124
- t.column :created_at, :timestamp
125
- t.column :updated_at, :timestamp
126
- t.column :page_id, :integer
127
- end
128
-
129
- end
130
-
131
- def self.down
132
- drop_table :gb_dialects
133
- drop_table :gb_rich_text_content_localizations
134
- drop_table :gb_dialects_gb_locales
135
- drop_table :gb_plain_text_content_localizations
136
- drop_table :gb_html_contents
137
- drop_table :gb_html_content_localizations
138
- drop_table :gb_image_contents
139
- drop_table :gb_users
140
- drop_table :gb_locales
141
- drop_table :gb_settings
142
- drop_table :gb_page_localizations
143
- drop_table :gb_rich_text_contents
144
- drop_table :gb_pages
145
- drop_table :gb_plain_text_contents
146
- end
147
- end
@@ -1,12 +0,0 @@
1
- class VersionTables < ActiveRecord::Migration
2
- def self.up
3
- #Gluttonberg::Page.create_versioned_table
4
- #Gluttonberg::PageLocalization.create_versioned_table
5
- end
6
-
7
- def self.down
8
- #Gluttonberg::Page.drop_versioned_table
9
- #Gluttonberg::PageLocalization.drop_versioned_table
10
- end
11
-
12
- end
@@ -1,9 +0,0 @@
1
- class AddStateColumn < ActiveRecord::Migration
2
- def self.up
3
- #add_column :pages , :state , :string
4
- end
5
-
6
- def self.down
7
- #remove_column :pages , :state
8
- end
9
- end
@@ -1,18 +0,0 @@
1
- class CreateUsers < ActiveRecord::Migration
2
- def self.up
3
- create_table :users do |t|
4
- t.string :email, :null => false
5
- t.string :crypted_password, :null => false
6
- t.string :password_salt, :null => false
7
- t.string :persistence_token, :null => false
8
- t.string :single_access_token, :null => false
9
- t.string :perishable_token, :null => false
10
- t.integer :login_count, :null => false, :default => 0
11
- t.timestamps
12
- end
13
- end
14
-
15
- def self.down
16
- drop_table :users
17
- end
18
- end
@@ -1,87 +0,0 @@
1
- class AssetLibrary < ActiveRecord::Migration
2
- def self.up
3
-
4
-
5
-
6
-
7
- create_table :gb_asset_categories do |t|
8
- t.column :name, :string, :null => false
9
- t.column :unknown, :boolean
10
- end
11
-
12
- create_table :gb_asset_types do |t|
13
- t.column :name, :string, :null => false
14
- t.column :asset_category_id, :integer, :default => 0
15
- #t.index :asset_category_id
16
- end
17
-
18
- create_table :gb_asset_mime_types do |t|
19
- t.column :mime_type, :string, :null => false
20
- t.column :asset_type_id, :integer, :default => 0
21
- end
22
-
23
-
24
- create_table :gb_asset_collections do |t|
25
- t.column :name, :string, :null => false
26
- t.column :created_at, :datetime
27
- t.column :updated_at, :datetime
28
- t.column :created_by, :integer
29
- t.column :updated_by, :integer
30
- end
31
-
32
- create_table :gb_assets do |t|
33
- t.column :mime_type, :string
34
- t.column :asset_type_id, :integer
35
- t.column :name, :string, :null => false
36
- t.column :description, :text
37
- t.column :file_name, :string
38
- t.column :asset_hash, :string
39
- t.column :size, :integer
40
- t.column :custom_thumbnail, :boolean
41
- t.column :created_at, :datetime
42
- t.column :updated_at, :datetime
43
- t.column :synopsis, :text
44
- t.column :copyrights, :text
45
- t.column :year_of_production, :integer
46
- t.column :created_by, :integer
47
- t.column :updated_by, :integer
48
- #t.column :type, :string
49
- t.column :duration, :string
50
- #t.index :asset_type_id
51
- # t.index :id
52
- # t.index :type
53
- end
54
-
55
-
56
- create_table :gb_audio_asset_attributes do |t|
57
- t.integer :asset_id , :null => false
58
- t.float :length
59
- t.string :title
60
- t.string :artist
61
- t.string :album
62
- t.string :tracknum
63
- t.string :genre
64
- t.timestamps
65
- end
66
-
67
- create_table :asset_collections_assets , :id => false do |t|
68
- t.column :asset_collection_id, :integer, :null => false
69
- t.column :asset_id, :integer, :null => false
70
- #t.index :asset_id
71
- end
72
-
73
-
74
-
75
-
76
- end
77
-
78
- def self.down
79
- drop_table :gb_asset_categories
80
- drop_table :gb_asset_types
81
- drop_table :gb_asset_mime_types
82
- drop_table :gb_asset_collections
83
- drop_table :gb_assets
84
- drop_table :asset_collections_assets
85
- drop_table :gb_audio_asset_attributes
86
- end
87
- end
data/lib/version.rb DELETED
@@ -1,3 +0,0 @@
1
- module Gluttonberg
2
- VERSION = "2.5.0"
3
- end