vanilla 1.17.3 → 1.17.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -76,7 +76,7 @@ if Object.const_defined?(:Gem)
76
76
  s.add_dependency("rack-test", ">=0.5.7")
77
77
 
78
78
  s.add_development_dependency("rake", ">= 0.9.1")
79
- s.add_development_dependency("kintama", ">= 0.1.7") # add any other gems for testing/development
79
+ s.add_development_dependency("kintama", ">= 0.1.11") # add any other gems for testing/development
80
80
  s.add_development_dependency("mocha")
81
81
  s.add_development_dependency("capybara")
82
82
  s.add_development_dependency("launchy")
@@ -52,7 +52,7 @@ module Vanilla
52
52
  e.title = snip.title || snip.name
53
53
  e.authors = [Atom::Person.new(:name => snip.author || domain)]
54
54
  e.links << Atom::Link.new(:href => "http://#{domain}#{app.url_to(snip.name)}")
55
- e.id = "tag:#{domain},#{atom_time(snip.created_at || Time.now).split("T")[0]}:/#{snip.name}"
55
+ e.id = "tag:#{domain},#{atom_time(snip.created_at || Time.now).split("T")[0]}:#{app.url_to(snip.name)}"
56
56
  end
57
57
  end
58
58
  end
@@ -37,12 +37,11 @@ module Vanilla
37
37
  rule(:right_brace) { str("}") }
38
38
 
39
39
  rule(:word) { match("[a-zA-Z0-9_\\-]").repeat(1) }
40
- rule(:quotables) { word | comma | spaces }
41
40
  rule(:double_quoted_string) do
42
- dquote >> (quotables | squote).repeat(1).as(:string) >> dquote
41
+ dquote >> (dquote.absent? >> any).repeat(1).as(:string) >> dquote
43
42
  end
44
43
  rule(:single_quoted_string) do
45
- squote >> (quotables | dquote).repeat(1).as(:string) >> squote
44
+ squote >> (squote.absent? >> any).repeat(1).as(:string) >> squote
46
45
  end
47
46
  rule(:spaced_string) { (word >> (spaces >> word).repeat).as(:string) }
48
47
  rule(:string) do
@@ -99,4 +98,4 @@ module Vanilla
99
98
  rule(:key_value_arg_list => sequence(:x)) { x.inject({}) { |h, kv| h.merge(kv.to_h) } }
100
99
  end
101
100
  end
102
- end
101
+ end
data/lib/vanilla.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Vanilla
2
- VERSION = "1.17.3"
2
+ VERSION = "1.17.4"
3
3
 
4
4
  autoload :Renderers, "vanilla/renderers"
5
5
  autoload :App, "vanilla/app"
@@ -199,6 +199,13 @@ context "An atom feed" do
199
199
  assert_equal "tag:yourdomain.example.com,2011-01-01:/Hello", get_feed.entries.first.id
200
200
  end
201
201
 
202
+ should "not include snip name spaces in ID" do
203
+ stub_app_soup({:name => "snip name", :content => "The *content*",
204
+ :render_as => "markdown", :created_at => Time.parse("2011-01-01 12:23").to_s})
205
+
206
+ assert_equal "tag:yourdomain.example.com,2011-01-01:/snip+name", get_feed.entries.first.id
207
+ end
208
+
202
209
  should "set the published date based on the snip created_at date" do
203
210
  assert_equal Time.parse("2011-01-01 12:23"), get_feed.entries.first.published
204
211
  end
@@ -83,6 +83,7 @@ context "The SnipReference parser" do
83
83
  %|{s 'arg, comma'}| => {:snip => 's', :attribute => nil, :arguments => ['arg, comma']},
84
84
  # %|{s "arg { open"}| => {:snip => 's', :attribute => nil, :arguments => ['arg { open']},
85
85
  # %|{s "arg } close"}| => {:snip => 's', :attribute => nil, :arguments => ['arg } close']}
86
+ %|{s 'arg.with.fullstop'}| => {:snip => 's', :attribute => nil, :arguments => ['arg.with.fullstop']},
86
87
  },
87
88
 
88
89
  :html_quoting_arguments => {
@@ -124,4 +125,4 @@ context "The SnipReference parser" do
124
125
  end
125
126
  create_snip(attributes)
126
127
  end
127
- end
128
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanilla
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.3
4
+ version: 1.17.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-04 00:00:00.000000000 Z
12
+ date: 2012-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
@@ -162,7 +162,7 @@ dependencies:
162
162
  requirements:
163
163
  - - ! '>='
164
164
  - !ruby/object:Gem::Version
165
- version: 0.1.7
165
+ version: 0.1.11
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
@@ -170,7 +170,7 @@ dependencies:
170
170
  requirements:
171
171
  - - ! '>='
172
172
  - !ruby/object:Gem::Version
173
- version: 0.1.7
173
+ version: 0.1.11
174
174
  - !ruby/object:Gem::Dependency
175
175
  name: mocha
176
176
  requirement: !ruby/object:Gem::Requirement
@@ -329,7 +329,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
329
329
  version: '0'
330
330
  segments:
331
331
  - 0
332
- hash: 110256896921410377
332
+ hash: 243429165522352075
333
333
  required_rubygems_version: !ruby/object:Gem::Requirement
334
334
  none: false
335
335
  requirements:
@@ -338,7 +338,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
338
338
  version: '0'
339
339
  segments:
340
340
  - 0
341
- hash: 110256896921410377
341
+ hash: 243429165522352075
342
342
  requirements: []
343
343
  rubyforge_project: vanilla
344
344
  rubygems_version: 1.8.23