hackety_sling 0.0.6 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: aec087cce60257c2b6cc60afb89f13352d3ea48f20693eb14b0b12491043b470
4
+ data.tar.gz: bb2a69d945aa6e170a1071829d4d52829f4049a29e51afb4a912748801c5d6ed
5
+ SHA512:
6
+ metadata.gz: 514777edf3e1caf49c0f725302f105680500ad73cd9f5dd9fc81e4949e888bdf7d5157f162514cd88013d933842ff0d856e3af13a43e9489b0e3285a1f7200f7
7
+ data.tar.gz: 5ae35ee18b30eb7d6a496d1dbc50fa1d1d2883b2838a09516d3d8c9cb09ebe224eba47e3b02ec4b5dddd01247b523a2a765106ecf1853a84242b60dec0c10f6e
@@ -16,9 +16,9 @@ Gem::Specification.new do |s|
16
16
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  s.require_paths = ['lib']
18
18
  s.add_dependency 'document_mapper'
19
- s.add_dependency 'erubis'
20
19
  s.add_dependency 'sinatra'
21
- s.add_dependency 'ratom'
20
+ s.add_dependency 'ratom-nokogiri'
21
+ s.add_development_dependency 'minitest'
22
22
  s.add_development_dependency 'rack-test'
23
23
  s.add_development_dependency 'RedCloth'
24
24
  end
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module HacketySling
3
- VERSION = '0.0.6'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
@@ -34,14 +34,14 @@ module Sinatra
34
34
  @post = post
35
35
  erb :post
36
36
  end
37
- base_name = post.file_name_without_extension.sub(/^\d{4}-\d{2}-\d{2}-/, '')
37
+ base_name = post.file_name_without_extension.sub(/\d{4}-\d{2}-\d{2}-/, '')
38
38
  app.get "/#{base_name}/?" do
39
39
  redirect post.permalink, 301
40
40
  end
41
41
  end
42
42
 
43
43
  ymd = [:year, :month, :day]
44
- app.get %r{^/(\d{4}/?)(\d{2}/?)?(\d{2}/?)?$} do
44
+ app.get %r{/(\d{4}/?)(\d{2}/?)?(\d{2}/?)?} do
45
45
  selector_hash = {}
46
46
  params[:captures].each_with_index do |date_part, index|
47
47
  selector_hash[ymd[index]] = date_part.to_i unless date_part.nil?
@@ -1,11 +1,9 @@
1
1
  $:.push File.expand_path('../../lib', __FILE__)
2
2
 
3
3
  require 'bundler/setup'
4
+ require 'minitest/autorun'
4
5
  require 'sinatra/hackety_sling'
5
- require 'minitest/spec'
6
- require 'minitest/mock'
7
6
  require 'rack/test'
8
- MiniTest::Unit.autorun
9
7
 
10
8
  require File.expand_path('../test_app', __FILE__)
11
9
 
data/test/post_test.rb CHANGED
@@ -1,9 +1,7 @@
1
1
  $:.push File.expand_path('../../lib', __FILE__)
2
2
 
3
3
  require 'bundler/setup'
4
- require 'minitest/spec'
5
- require 'minitest/mock'
6
- MiniTest::Unit.autorun
4
+ require 'minitest/autorun'
7
5
 
8
6
  require 'sinatra/hackety_sling/post'
9
7
  include Sinatra::HacketySling
metadata CHANGED
@@ -1,82 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackety_sling
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
5
- prerelease:
4
+ version: 0.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ralph von der Heyden
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-01-12 00:00:00.000000000 Z
11
+ date: 2022-12-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: document_mapper
16
- requirement: &70312818736560 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *70312818736560
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
- name: erubis
27
- requirement: &70312818736140 !ruby/object:Gem::Requirement
28
- none: false
28
+ name: sinatra
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
- - - ! '>='
31
+ - - ">="
31
32
  - !ruby/object:Gem::Version
32
33
  version: '0'
33
34
  type: :runtime
34
35
  prerelease: false
35
- version_requirements: *70312818736140
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
36
41
  - !ruby/object:Gem::Dependency
37
- name: sinatra
38
- requirement: &70312818735720 !ruby/object:Gem::Requirement
39
- none: false
42
+ name: ratom-nokogiri
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
- - - ! '>='
45
+ - - ">="
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
48
  type: :runtime
45
49
  prerelease: false
46
- version_requirements: *70312818735720
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  - !ruby/object:Gem::Dependency
48
- name: ratom
49
- requirement: &70312818735280 !ruby/object:Gem::Requirement
50
- none: false
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
- - - ! '>='
59
+ - - ">="
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
- type: :runtime
62
+ type: :development
56
63
  prerelease: false
57
- version_requirements: *70312818735280
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: rack-test
60
- requirement: &70312818734820 !ruby/object:Gem::Requirement
61
- none: false
71
+ requirement: !ruby/object:Gem::Requirement
62
72
  requirements:
63
- - - ! '>='
73
+ - - ">="
64
74
  - !ruby/object:Gem::Version
65
75
  version: '0'
66
76
  type: :development
67
77
  prerelease: false
68
- version_requirements: *70312818734820
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: RedCloth
71
- requirement: &70312818734320 !ruby/object:Gem::Requirement
72
- none: false
85
+ requirement: !ruby/object:Gem::Requirement
73
86
  requirements:
74
- - - ! '>='
87
+ - - ">="
75
88
  - !ruby/object:Gem::Version
76
89
  version: '0'
77
90
  type: :development
78
91
  prerelease: false
79
- version_requirements: *70312818734320
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
80
97
  description: A simple blog engine based on Sinatra and document_mapper
81
98
  email:
82
99
  - ralph@rvdh.de
@@ -84,8 +101,8 @@ executables: []
84
101
  extensions: []
85
102
  extra_rdoc_files: []
86
103
  files:
87
- - .gitignore
88
- - .travis.yml
104
+ - ".gitignore"
105
+ - ".travis.yml"
89
106
  - Gemfile
90
107
  - README.md
91
108
  - Rakefile
@@ -106,33 +123,25 @@ files:
106
123
  - views/posts.erb
107
124
  homepage: http://rvdh.de
108
125
  licenses: []
109
- post_install_message:
126
+ metadata: {}
127
+ post_install_message:
110
128
  rdoc_options: []
111
129
  require_paths:
112
130
  - lib
113
131
  required_ruby_version: !ruby/object:Gem::Requirement
114
- none: false
115
132
  requirements:
116
- - - ! '>='
133
+ - - ">="
117
134
  - !ruby/object:Gem::Version
118
135
  version: '0'
119
- segments:
120
- - 0
121
- hash: -930684126590065733
122
136
  required_rubygems_version: !ruby/object:Gem::Requirement
123
- none: false
124
137
  requirements:
125
- - - ! '>='
138
+ - - ">="
126
139
  - !ruby/object:Gem::Version
127
140
  version: '0'
128
- segments:
129
- - 0
130
- hash: -930684126590065733
131
141
  requirements: []
132
- rubyforge_project:
133
- rubygems_version: 1.8.10
134
- signing_key:
135
- specification_version: 3
142
+ rubygems_version: 3.3.26
143
+ signing_key:
144
+ specification_version: 4
136
145
  summary: A simple blog engine based on Sinatra and document_mapper
137
146
  test_files:
138
147
  - test/hackety_sling_test.rb