zen 0.3b1 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
data/AUTHORS CHANGED
@@ -1,4 +1,4 @@
1
1
  Following persons have contributed to Zen.
2
2
  (Sorted by number of submitted patches, then alphabetically)
3
3
 
4
- 313 Yorick Peterse <yorickpeterse@gmail.com>
4
+ 321 Yorick Peterse <yorickpeterse@gmail.com>
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3 - November 27th, 2011
4
+
5
+ * Fixed slug generation.
6
+ * Don't load a language file if it is empty.
7
+ * Log migration notices using Ramaze::Log.
8
+ * Simplified the Rake task for the change list.
9
+ * Fixed the rake task for building a change list
10
+ * Serialize setting values upon migrating them.
11
+ * Log Marshal notices as debug messages.
12
+
3
13
  ## 0.3.b1 - November 24th, 2011
4
14
 
5
15
  * Added a markup option for retrieving entries.
@@ -38,7 +38,7 @@ module Sequel
38
38
  # If a slug is an empty string or a nil value it's value should be
39
39
  # pulled from the source attribute.
40
40
  if value.nil? or (value.respond_to?(:empty?) and value.empty?)
41
- slug = self.send(self.class.sluggable_options[:source])
41
+ slug = to_slug(self.send(self.class.sluggable_options[:source]))
42
42
  end
43
43
 
44
44
  slug ||= to_slug(value)
@@ -235,9 +235,11 @@ module Zen
235
235
  # Load the language
236
236
  if File.exist?(path)
237
237
  require(path)
238
- language.collections[lang_name].load
239
238
 
240
- return
239
+ unless language.collections[lang_name].nil?
240
+ language.collections[lang_name].load
241
+ return
242
+ end
241
243
  end
242
244
  end
243
245
 
@@ -145,7 +145,10 @@ module Settings
145
145
  name = name.to_s
146
146
 
147
147
  if !settings.include?(name)
148
- Zen.database[:settings].insert(:name => name)
148
+ Zen.database[:settings].insert(
149
+ :name => name,
150
+ :value => setting.serialize(setting.default)
151
+ )
149
152
  end
150
153
  end
151
154
  end
@@ -337,8 +340,6 @@ module Settings
337
340
  return val.is_a?(String) && val == '1'
338
341
  end
339
342
 
340
- private
341
-
342
343
  ##
343
344
  # Serializes a value using Marshal and packs it so that it can be stored in
344
345
  # the database.
@@ -366,7 +367,7 @@ module Settings
366
367
  begin
367
368
  return Marshal.load(value)
368
369
  rescue
369
- Ramaze::Log.info(
370
+ Ramaze::Log.debug(
370
371
  'Failed to unpack the setting using Marshal, using the ' \
371
372
  'raw value instead'
372
373
  )
@@ -43,12 +43,9 @@ namespace :build do
43
43
  task :changes, [:tag] do |t, args|
44
44
  args.with_defaults(:tag => `git tag`.split(/\n/)[-1])
45
45
 
46
- stop = `git log -1 --pretty=oneline --color=never`.split(/\s+/)[0]
47
- start = `git show #{args[:tag]} --pretty=oneline --color=never` \
48
- .split(/\s+/)[0]
49
-
50
- log = `git --no-pager log --color=never --pretty=oneline \
51
- #{start}..#{stop}`.split(/\n/)
46
+ stop = `git log -1 --pretty=oneline --color=never`.split(/\s+/)[0]
47
+ log = `git --no-pager log --color=never --pretty=oneline \
48
+ #{args[:tag]}..#{stop}`.split(/\n/)
52
49
 
53
50
  log.each do |line|
54
51
  line = line.split(/\s+/, 2)[1].strip
@@ -13,7 +13,9 @@ namespace :db do
13
13
  if pkg.respond_to?(:migrations) and !pkg.migrations.nil?
14
14
  dir = pkg.migrations
15
15
  else
16
- puts "Skipping #{pkg.title} as it has no migrations directory"
16
+ Ramaze::Log.info(
17
+ "Skipping #{pkg.title} as it has no migrations directory"
18
+ )
17
19
  next
18
20
  end
19
21
 
@@ -45,7 +47,9 @@ namespace :db do
45
47
  if pkg.respond_to?(:migrations) and !pkg.migrations.nil?
46
48
  dir = pkg.migrations
47
49
  else
48
- puts "Skipping #{pkg.title} as it has no migrations directory"
50
+ Ramaze::Log.info(
51
+ "Skipping #{pkg.title} as it has no migrations directory"
52
+ )
49
53
  next
50
54
  end
51
55
 
@@ -1,4 +1,4 @@
1
1
  module Zen
2
2
  # :nodoc:
3
- VERSION = '0.3b1'
3
+ VERSION = '0.3'
4
4
  end
@@ -85,6 +85,7 @@ describe("Sections::Controller::SectionEntries") do
85
85
 
86
86
  current_path.should =~ /#{edit_url}\/[0-9]+/
87
87
  page.find('input[name="title"]').value.should == 'Spec entry'
88
+ page.find('input[name="slug"]').value.should == 'spec-entry'
88
89
 
89
90
  page.find('select[name="section_entry_status_id"] option[selected]') \
90
91
  .text.should == status_field
@@ -5,7 +5,7 @@ path = File.expand_path('../', __FILE__)
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'zen'
7
7
  s.version = Zen::VERSION
8
- s.date = '2011-11-24'
8
+ s.date = '2011-11-27'
9
9
  s.authors = ['Yorick Peterse']
10
10
  s.email = 'info@yorickpeterse.com'
11
11
  s.summary = 'Zen is a modular CMS written using Ramaze.'
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3b1
5
- prerelease: 3
4
+ version: '0.3'
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Yorick Peterse
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-24 00:00:00.000000000 Z
12
+ date: 2011-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sequel
16
- requirement: &2156048860 !ruby/object:Gem::Requirement
16
+ requirement: &2153035080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.28.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2156048860
24
+ version_requirements: *2153035080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: ramaze
27
- requirement: &2156046360 !ruby/object:Gem::Requirement
27
+ requirement: &2153034600 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2011.10.23
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2156046360
35
+ version_requirements: *2153034600
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bcrypt-ruby
38
- requirement: &2156044660 !ruby/object:Gem::Requirement
38
+ requirement: &2153034120 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 3.0.1
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2156044660
46
+ version_requirements: *2153034120
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &2156043180 !ruby/object:Gem::Requirement
49
+ requirement: &2153033640 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.9.2
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2156043180
57
+ version_requirements: *2153033640
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: loofah
60
- requirement: &2156042240 !ruby/object:Gem::Requirement
60
+ requirement: &2153033160 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.2.0
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *2156042240
68
+ version_requirements: *2153033160
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ramaze-asset
71
- requirement: &2155894260 !ruby/object:Gem::Requirement
71
+ requirement: &2153032680 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 0.2.3
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *2155894260
79
+ version_requirements: *2153032680
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: shebang
82
- requirement: &2155891860 !ruby/object:Gem::Requirement
82
+ requirement: &2153032200 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0.1'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *2155891860
90
+ version_requirements: *2153032200
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rdiscount
93
- requirement: &2155889700 !ruby/object:Gem::Requirement
93
+ requirement: &2153031720 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: 1.6.8
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *2155889700
101
+ version_requirements: *2153031720
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: RedCloth
104
- requirement: &2156040220 !ruby/object:Gem::Requirement
104
+ requirement: &2153031240 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: 4.2.8
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *2156040220
112
+ version_requirements: *2153031240
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: bacon
115
- requirement: &2156035120 !ruby/object:Gem::Requirement
115
+ requirement: &2153030760 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: 1.1.0
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *2156035120
123
+ version_requirements: *2153030760
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: yard
126
- requirement: &2156034260 !ruby/object:Gem::Requirement
126
+ requirement: &2153030280 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: 0.7.2
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *2156034260
134
+ version_requirements: *2153030280
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: capybara
137
- requirement: &2156033340 !ruby/object:Gem::Requirement
137
+ requirement: &2153029800 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: 1.1.1
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *2156033340
145
+ version_requirements: *2153029800
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: sqlite3
148
- requirement: &2156031840 !ruby/object:Gem::Requirement
148
+ requirement: &2153029320 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: 1.3.4
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *2156031840
156
+ version_requirements: *2153029320
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: defensio
159
- requirement: &2156029320 !ruby/object:Gem::Requirement
159
+ requirement: &2152663560 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,10 +164,10 @@ dependencies:
164
164
  version: 0.9.1
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *2156029320
167
+ version_requirements: *2152663560
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: simplecov
170
- requirement: &2156027760 !ruby/object:Gem::Requirement
170
+ requirement: &2153025980 !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
173
  - - ! '>='
@@ -175,10 +175,10 @@ dependencies:
175
175
  version: 0.4.2
176
176
  type: :development
177
177
  prerelease: false
178
- version_requirements: *2156027760
178
+ version_requirements: *2153025980
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: webmock
181
- requirement: &2156026440 !ruby/object:Gem::Requirement
181
+ requirement: &2153025500 !ruby/object:Gem::Requirement
182
182
  none: false
183
183
  requirements:
184
184
  - - ! '>='
@@ -186,7 +186,7 @@ dependencies:
186
186
  version: 1.6.4
187
187
  type: :development
188
188
  prerelease: false
189
- version_requirements: *2156026440
189
+ version_requirements: *2153025500
190
190
  description: Zen is a modular CMS written using Ramaze. Zen gives you complete freedom
191
191
  to build whatever you want in whatever way you might want to build it.
192
192
  email: info@yorickpeterse.com
@@ -612,9 +612,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
612
612
  required_rubygems_version: !ruby/object:Gem::Requirement
613
613
  none: false
614
614
  requirements:
615
- - - ! '>'
615
+ - - ! '>='
616
616
  - !ruby/object:Gem::Version
617
- version: 1.3.1
617
+ version: '0'
618
618
  requirements: []
619
619
  rubyforge_project:
620
620
  rubygems_version: 1.8.10