ro 1.4.6 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +6 -14
  2. data/Gemfile +2 -0
  3. data/Gemfile.lock +43 -0
  4. data/LICENSE +1 -0
  5. data/README.md +120 -112
  6. data/README.md.erb +159 -0
  7. data/Rakefile +129 -78
  8. data/bin/ro +241 -68
  9. data/lib/ro/_lib.rb +95 -0
  10. data/lib/ro/asset.rb +45 -0
  11. data/lib/ro/collection/list.rb +23 -0
  12. data/lib/ro/collection.rb +168 -0
  13. data/lib/ro/config.rb +68 -0
  14. data/lib/ro/error.rb +8 -0
  15. data/lib/ro/klass.rb +25 -0
  16. data/lib/ro/methods.rb +238 -0
  17. data/lib/ro/model.rb +83 -114
  18. data/lib/ro/node.rb +177 -360
  19. data/lib/ro/pagination.rb +7 -4
  20. data/lib/ro/path.rb +225 -0
  21. data/lib/ro/root.rb +52 -31
  22. data/lib/ro/script/builder.rb +221 -0
  23. data/lib/ro/script/console.rb +47 -0
  24. data/lib/ro/script/server.rb +76 -0
  25. data/lib/ro/script.rb +189 -0
  26. data/lib/ro/slug.rb +19 -18
  27. data/lib/ro/template/rouge_formatter.rb +42 -0
  28. data/lib/ro/template.rb +104 -50
  29. data/lib/ro.rb +85 -317
  30. data/public/api/ro/index-1.json +147 -0
  31. data/public/api/ro/index.json +137 -0
  32. data/public/api/ro/posts/first_post/index.json +52 -0
  33. data/public/api/ro/posts/index-1.json +145 -0
  34. data/public/api/ro/posts/index.json +135 -0
  35. data/public/api/ro/posts/second_post/index.json +51 -0
  36. data/public/api/ro/posts/third_post/index.json +51 -0
  37. data/public/ro/posts/first_post/assets/foo/bar/baz.jpg +0 -0
  38. data/public/ro/posts/first_post/assets/foo.jpg +0 -0
  39. data/public/ro/posts/first_post/assets/src/foo/bar.rb +3 -0
  40. data/public/ro/posts/first_post/attributes.yml +2 -0
  41. data/public/ro/posts/first_post/blurb.erb.md +7 -0
  42. data/public/ro/posts/first_post/body.md +16 -0
  43. data/public/ro/posts/first_post/testing.txt +3 -0
  44. data/public/ro/posts/second_post/assets/foo/bar/baz.jpg +0 -0
  45. data/public/ro/posts/second_post/assets/foo.jpg +0 -0
  46. data/public/ro/posts/second_post/assets/src/foo/bar.rb +3 -0
  47. data/public/ro/posts/second_post/attributes.yml +2 -0
  48. data/public/ro/posts/second_post/blurb.erb.md +5 -0
  49. data/public/ro/posts/second_post/body.md +16 -0
  50. data/public/ro/posts/third_post/assets/foo/bar/baz.jpg +0 -0
  51. data/public/ro/posts/third_post/assets/foo.jpg +0 -0
  52. data/public/ro/posts/third_post/assets/src/foo/bar.rb +3 -0
  53. data/public/ro/posts/third_post/attributes.yml +2 -0
  54. data/public/ro/posts/third_post/blurb.erb.md +5 -0
  55. data/public/ro/posts/third_post/body.md +16 -0
  56. data/ro.gemspec +89 -29
  57. metadata +106 -90
  58. data/TODO.md +0 -50
  59. data/lib/ro/blankslate.rb +0 -7
  60. data/lib/ro/cache.rb +0 -26
  61. data/lib/ro/git.rb +0 -374
  62. data/lib/ro/initializers/env.rb +0 -5
  63. data/lib/ro/initializers/tilt.rb +0 -104
  64. data/lib/ro/lock.rb +0 -53
  65. data/lib/ro/node/list.rb +0 -142
  66. data/notes/ara.txt +0 -215
@@ -0,0 +1,3 @@
1
+ class C
2
+ A = 42
3
+ end
@@ -0,0 +1,2 @@
1
+ title: Second Post
2
+ author: people/alice
@@ -0,0 +1,5 @@
1
+ * a
2
+ * b
3
+ * c
4
+
5
+ generated_at: <%= Time.now.utc.iso8601 %>
@@ -0,0 +1,16 @@
1
+ * one
2
+ * two
3
+ * three
4
+
5
+ ```ruby
6
+ class C
7
+ @a = 42
8
+ end
9
+ ```
10
+
11
+ <hr/>
12
+
13
+ <img src="assets/foo.jpg" />
14
+ <br />
15
+
16
+ <img src="assets/foo/bar/baz.jpg" />
@@ -0,0 +1,3 @@
1
+ class C
2
+ A = 42
3
+ end
@@ -0,0 +1,2 @@
1
+ title: First Post
2
+ author: people/alice
@@ -0,0 +1,5 @@
1
+ * a
2
+ * b
3
+ * c
4
+
5
+ generated_at: <%= Time.now.utc.iso8601 %>
@@ -0,0 +1,16 @@
1
+ * one
2
+ * two
3
+ * three
4
+
5
+ ```ruby
6
+ class C
7
+ @a = 42
8
+ end
9
+ ```
10
+
11
+ <hr/>
12
+
13
+ <img src="assets/foo.jpg" />
14
+ <br />
15
+
16
+ <img src="assets/foo/bar/baz.jpg" />
data/ro.gemspec CHANGED
@@ -3,63 +3,123 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "ro"
6
- spec.version = "1.4.6"
6
+ spec.version = "4.2.0"
7
+ spec.required_ruby_version = '>= 3.0'
7
8
  spec.platform = Gem::Platform::RUBY
8
- spec.summary = "ro"
9
- spec.description = "description: ro kicks the ass"
10
- spec.license = "Same As Ruby's"
9
+ spec.summary = "all your content in github, as god intended"
10
+ spec.description = "all your content in github, as god intended"
11
+ spec.license = "Ruby"
11
12
 
12
13
  spec.files =
13
- ["README.md",
14
+ ["Gemfile",
15
+ "Gemfile.lock",
16
+ "LICENSE",
17
+ "README.md",
18
+ "README.md.erb",
14
19
  "Rakefile",
15
- "TODO.md",
20
+ "bin",
16
21
  "bin/ro",
22
+ "lib",
23
+ "lib/ro",
17
24
  "lib/ro.rb",
18
- "lib/ro/blankslate.rb",
19
- "lib/ro/cache.rb",
20
- "lib/ro/git.rb",
21
- "lib/ro/initializers/env.rb",
22
- "lib/ro/initializers/tilt.rb",
23
- "lib/ro/lock.rb",
25
+ "lib/ro/_lib.rb",
26
+ "lib/ro/asset.rb",
27
+ "lib/ro/collection",
28
+ "lib/ro/collection.rb",
29
+ "lib/ro/collection/list.rb",
30
+ "lib/ro/config.rb",
31
+ "lib/ro/error.rb",
32
+ "lib/ro/klass.rb",
33
+ "lib/ro/methods.rb",
24
34
  "lib/ro/model.rb",
25
35
  "lib/ro/node.rb",
26
- "lib/ro/node/list.rb",
27
36
  "lib/ro/pagination.rb",
37
+ "lib/ro/path.rb",
28
38
  "lib/ro/root.rb",
39
+ "lib/ro/script",
40
+ "lib/ro/script.rb",
41
+ "lib/ro/script/builder.rb",
42
+ "lib/ro/script/console.rb",
43
+ "lib/ro/script/server.rb",
29
44
  "lib/ro/slug.rb",
45
+ "lib/ro/template",
30
46
  "lib/ro/template.rb",
31
- "notes/ara.txt",
47
+ "lib/ro/template/rouge_formatter.rb",
48
+ "public",
49
+ "public/api",
50
+ "public/api/ro",
51
+ "public/api/ro/index-1.json",
52
+ "public/api/ro/index.json",
53
+ "public/api/ro/posts",
54
+ "public/api/ro/posts/first_post",
55
+ "public/api/ro/posts/first_post/index.json",
56
+ "public/api/ro/posts/index-1.json",
57
+ "public/api/ro/posts/index.json",
58
+ "public/api/ro/posts/second_post",
59
+ "public/api/ro/posts/second_post/index.json",
60
+ "public/api/ro/posts/third_post",
61
+ "public/api/ro/posts/third_post/index.json",
62
+ "public/ro",
63
+ "public/ro/posts",
64
+ "public/ro/posts/first_post",
65
+ "public/ro/posts/first_post/assets",
66
+ "public/ro/posts/first_post/assets/foo",
67
+ "public/ro/posts/first_post/assets/foo.jpg",
68
+ "public/ro/posts/first_post/assets/foo/bar",
69
+ "public/ro/posts/first_post/assets/foo/bar/baz.jpg",
70
+ "public/ro/posts/first_post/assets/src",
71
+ "public/ro/posts/first_post/assets/src/foo",
72
+ "public/ro/posts/first_post/assets/src/foo/bar.rb",
73
+ "public/ro/posts/first_post/attributes.yml",
74
+ "public/ro/posts/first_post/blurb.erb.md",
75
+ "public/ro/posts/first_post/body.md",
76
+ "public/ro/posts/first_post/testing.txt",
77
+ "public/ro/posts/second_post",
78
+ "public/ro/posts/second_post/assets",
79
+ "public/ro/posts/second_post/assets/foo",
80
+ "public/ro/posts/second_post/assets/foo.jpg",
81
+ "public/ro/posts/second_post/assets/foo/bar",
82
+ "public/ro/posts/second_post/assets/foo/bar/baz.jpg",
83
+ "public/ro/posts/second_post/assets/src",
84
+ "public/ro/posts/second_post/assets/src/foo",
85
+ "public/ro/posts/second_post/assets/src/foo/bar.rb",
86
+ "public/ro/posts/second_post/attributes.yml",
87
+ "public/ro/posts/second_post/blurb.erb.md",
88
+ "public/ro/posts/second_post/body.md",
89
+ "public/ro/posts/third_post",
90
+ "public/ro/posts/third_post/assets",
91
+ "public/ro/posts/third_post/assets/foo",
92
+ "public/ro/posts/third_post/assets/foo.jpg",
93
+ "public/ro/posts/third_post/assets/foo/bar",
94
+ "public/ro/posts/third_post/assets/foo/bar/baz.jpg",
95
+ "public/ro/posts/third_post/assets/src",
96
+ "public/ro/posts/third_post/assets/src/foo",
97
+ "public/ro/posts/third_post/assets/src/foo/bar.rb",
98
+ "public/ro/posts/third_post/attributes.yml",
99
+ "public/ro/posts/third_post/blurb.erb.md",
100
+ "public/ro/posts/third_post/body.md",
32
101
  "ro.gemspec"]
33
102
 
34
103
  spec.executables = ["ro"]
35
104
 
36
105
  spec.require_path = "lib"
37
106
 
38
- spec.test_files = nil
39
-
40
-
41
- spec.add_dependency(*["map", " >= 6.5.1"])
42
-
43
- spec.add_dependency(*["fattr", " >= 2.2.1"])
44
-
45
- spec.add_dependency(*["tilt", " >= 1.3.1"])
46
107
 
47
- spec.add_dependency(*["pygments.rb", " >= 0.5.0"])
108
+ spec.add_dependency(*["map", "~> 6.6", ">= 6.6.0"])
48
109
 
49
- spec.add_dependency(*["coerce", " >= 0.0.4"])
110
+ spec.add_dependency(*["kramdown", "~> 2.4", " >= 2.4.0"])
50
111
 
51
- spec.add_dependency(*["stringex", " >= 2.1.0"])
112
+ spec.add_dependency(*["kramdown-parser-gfm", "~> 1.1", " >= 1.1.0"])
52
113
 
53
- spec.add_dependency(*["systemu", " >= 2.5.2"])
114
+ spec.add_dependency(*["rouge", "~> 4.1", " >= 4.1.1"])
54
115
 
55
- spec.add_dependency(*["nokogiri", " >= 1.6.1"])
116
+ spec.add_dependency(*["ak47", "~> 0.2"])
56
117
 
57
- spec.add_dependency(*["main", " >= 5.2.0"])
118
+ spec.add_dependency(*["webrick", "~> 1.8.1"])
58
119
 
59
120
 
60
121
  spec.extensions.push(*[])
61
122
 
62
- spec.rubyforge_project = "codeforpeople"
63
123
  spec.author = "Ara T. Howard"
64
124
  spec.email = "ara.t.howard@gmail.com"
65
125
  spec.homepage = "https://github.com/ahoward/ro"
metadata CHANGED
@@ -1,190 +1,206 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ro
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ara T. Howard
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-18 00:00:00.000000000 Z
11
+ date: 2024-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: map
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 6.5.1
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ! '>='
25
- - !ruby/object:Gem::Version
26
- version: 6.5.1
27
- - !ruby/object:Gem::Dependency
28
- name: fattr
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ! '>='
19
+ version: '6.6'
20
+ - - ">="
32
21
  - !ruby/object:Gem::Version
33
- version: 2.2.1
22
+ version: 6.6.0
34
23
  type: :runtime
35
24
  prerelease: false
36
25
  version_requirements: !ruby/object:Gem::Requirement
37
26
  requirements:
38
- - - ! '>='
27
+ - - "~>"
39
28
  - !ruby/object:Gem::Version
40
- version: 2.2.1
41
- - !ruby/object:Gem::Dependency
42
- name: tilt
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ! '>='
46
- - !ruby/object:Gem::Version
47
- version: 1.3.1
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ! '>='
29
+ version: '6.6'
30
+ - - ">="
53
31
  - !ruby/object:Gem::Version
54
- version: 1.3.1
32
+ version: 6.6.0
55
33
  - !ruby/object:Gem::Dependency
56
- name: pygments.rb
34
+ name: kramdown
57
35
  requirement: !ruby/object:Gem::Requirement
58
36
  requirements:
59
- - - ! '>='
37
+ - - "~>"
60
38
  - !ruby/object:Gem::Version
61
- version: 0.5.0
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ! '>='
39
+ version: '2.4'
40
+ - - ">="
67
41
  - !ruby/object:Gem::Version
68
- version: 0.5.0
69
- - !ruby/object:Gem::Dependency
70
- name: coerce
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ! '>='
74
- - !ruby/object:Gem::Version
75
- version: 0.0.4
42
+ version: 2.4.0
76
43
  type: :runtime
77
44
  prerelease: false
78
45
  version_requirements: !ruby/object:Gem::Requirement
79
46
  requirements:
80
- - - ! '>='
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '2.4'
50
+ - - ">="
81
51
  - !ruby/object:Gem::Version
82
- version: 0.0.4
52
+ version: 2.4.0
83
53
  - !ruby/object:Gem::Dependency
84
- name: stringex
54
+ name: kramdown-parser-gfm
85
55
  requirement: !ruby/object:Gem::Requirement
86
56
  requirements:
87
- - - ! '>='
57
+ - - "~>"
88
58
  - !ruby/object:Gem::Version
89
- version: 2.1.0
59
+ version: '1.1'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 1.1.0
90
63
  type: :runtime
91
64
  prerelease: false
92
65
  version_requirements: !ruby/object:Gem::Requirement
93
66
  requirements:
94
- - - ! '>='
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.1'
70
+ - - ">="
95
71
  - !ruby/object:Gem::Version
96
- version: 2.1.0
72
+ version: 1.1.0
97
73
  - !ruby/object:Gem::Dependency
98
- name: systemu
74
+ name: rouge
99
75
  requirement: !ruby/object:Gem::Requirement
100
76
  requirements:
101
- - - ! '>='
77
+ - - "~>"
102
78
  - !ruby/object:Gem::Version
103
- version: 2.5.2
79
+ version: '4.1'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 4.1.1
104
83
  type: :runtime
105
84
  prerelease: false
106
85
  version_requirements: !ruby/object:Gem::Requirement
107
86
  requirements:
108
- - - ! '>='
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '4.1'
90
+ - - ">="
109
91
  - !ruby/object:Gem::Version
110
- version: 2.5.2
92
+ version: 4.1.1
111
93
  - !ruby/object:Gem::Dependency
112
- name: nokogiri
94
+ name: ak47
113
95
  requirement: !ruby/object:Gem::Requirement
114
96
  requirements:
115
- - - ! '>='
97
+ - - "~>"
116
98
  - !ruby/object:Gem::Version
117
- version: 1.6.1
99
+ version: '0.2'
118
100
  type: :runtime
119
101
  prerelease: false
120
102
  version_requirements: !ruby/object:Gem::Requirement
121
103
  requirements:
122
- - - ! '>='
104
+ - - "~>"
123
105
  - !ruby/object:Gem::Version
124
- version: 1.6.1
106
+ version: '0.2'
125
107
  - !ruby/object:Gem::Dependency
126
- name: main
108
+ name: webrick
127
109
  requirement: !ruby/object:Gem::Requirement
128
110
  requirements:
129
- - - ! '>='
111
+ - - "~>"
130
112
  - !ruby/object:Gem::Version
131
- version: 5.2.0
113
+ version: 1.8.1
132
114
  type: :runtime
133
115
  prerelease: false
134
116
  version_requirements: !ruby/object:Gem::Requirement
135
117
  requirements:
136
- - - ! '>='
118
+ - - "~>"
137
119
  - !ruby/object:Gem::Version
138
- version: 5.2.0
139
- description: ! 'description: ro kicks the ass'
120
+ version: 1.8.1
121
+ description: all your content in github, as god intended
140
122
  email: ara.t.howard@gmail.com
141
123
  executables:
142
124
  - ro
143
125
  extensions: []
144
126
  extra_rdoc_files: []
145
127
  files:
128
+ - Gemfile
129
+ - Gemfile.lock
130
+ - LICENSE
146
131
  - README.md
132
+ - README.md.erb
147
133
  - Rakefile
148
- - TODO.md
149
134
  - bin/ro
150
135
  - lib/ro.rb
151
- - lib/ro/blankslate.rb
152
- - lib/ro/cache.rb
153
- - lib/ro/git.rb
154
- - lib/ro/initializers/env.rb
155
- - lib/ro/initializers/tilt.rb
156
- - lib/ro/lock.rb
136
+ - lib/ro/_lib.rb
137
+ - lib/ro/asset.rb
138
+ - lib/ro/collection.rb
139
+ - lib/ro/collection/list.rb
140
+ - lib/ro/config.rb
141
+ - lib/ro/error.rb
142
+ - lib/ro/klass.rb
143
+ - lib/ro/methods.rb
157
144
  - lib/ro/model.rb
158
145
  - lib/ro/node.rb
159
- - lib/ro/node/list.rb
160
146
  - lib/ro/pagination.rb
147
+ - lib/ro/path.rb
161
148
  - lib/ro/root.rb
149
+ - lib/ro/script.rb
150
+ - lib/ro/script/builder.rb
151
+ - lib/ro/script/console.rb
152
+ - lib/ro/script/server.rb
162
153
  - lib/ro/slug.rb
163
154
  - lib/ro/template.rb
164
- - notes/ara.txt
155
+ - lib/ro/template/rouge_formatter.rb
156
+ - public/api/ro/index-1.json
157
+ - public/api/ro/index.json
158
+ - public/api/ro/posts/first_post/index.json
159
+ - public/api/ro/posts/index-1.json
160
+ - public/api/ro/posts/index.json
161
+ - public/api/ro/posts/second_post/index.json
162
+ - public/api/ro/posts/third_post/index.json
163
+ - public/ro/posts/first_post/assets/foo.jpg
164
+ - public/ro/posts/first_post/assets/foo/bar/baz.jpg
165
+ - public/ro/posts/first_post/assets/src/foo/bar.rb
166
+ - public/ro/posts/first_post/attributes.yml
167
+ - public/ro/posts/first_post/blurb.erb.md
168
+ - public/ro/posts/first_post/body.md
169
+ - public/ro/posts/first_post/testing.txt
170
+ - public/ro/posts/second_post/assets/foo.jpg
171
+ - public/ro/posts/second_post/assets/foo/bar/baz.jpg
172
+ - public/ro/posts/second_post/assets/src/foo/bar.rb
173
+ - public/ro/posts/second_post/attributes.yml
174
+ - public/ro/posts/second_post/blurb.erb.md
175
+ - public/ro/posts/second_post/body.md
176
+ - public/ro/posts/third_post/assets/foo.jpg
177
+ - public/ro/posts/third_post/assets/foo/bar/baz.jpg
178
+ - public/ro/posts/third_post/assets/src/foo/bar.rb
179
+ - public/ro/posts/third_post/attributes.yml
180
+ - public/ro/posts/third_post/blurb.erb.md
181
+ - public/ro/posts/third_post/body.md
165
182
  - ro.gemspec
166
183
  homepage: https://github.com/ahoward/ro
167
184
  licenses:
168
- - Same As Ruby's
185
+ - Ruby
169
186
  metadata: {}
170
- post_install_message:
187
+ post_install_message:
171
188
  rdoc_options: []
172
189
  require_paths:
173
190
  - lib
174
191
  required_ruby_version: !ruby/object:Gem::Requirement
175
192
  requirements:
176
- - - ! '>='
193
+ - - ">="
177
194
  - !ruby/object:Gem::Version
178
- version: '0'
195
+ version: '3.0'
179
196
  required_rubygems_version: !ruby/object:Gem::Requirement
180
197
  requirements:
181
- - - ! '>='
198
+ - - ">="
182
199
  - !ruby/object:Gem::Version
183
200
  version: '0'
184
201
  requirements: []
185
- rubyforge_project: codeforpeople
186
- rubygems_version: 2.0.3
187
- signing_key:
202
+ rubygems_version: 3.5.19
203
+ signing_key:
188
204
  specification_version: 4
189
- summary: ro
205
+ summary: all your content in github, as god intended
190
206
  test_files: []
data/TODO.md DELETED
@@ -1,50 +0,0 @@
1
- todo:
2
-
3
- Model[id]
4
- Model.select
5
- Model.where
6
-
7
- - reconsider using active_model...
8
-
9
- - with ro, do we/should we need to expand assets?
10
- - posts
11
- - body.md -> html -> expand_asset_urls?
12
-
13
- - https://github.com/rails/rails/blob/master/activemodel/lib/active_model/model.rb
14
-
15
- - track where shit comes from...
16
-
17
- - custom ui better?
18
- - chiclets
19
- - posts
20
-
21
- done:
22
-
23
- - expand relative asset links in html
24
-
25
- - patch based transactions
26
-
27
- - http://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/
28
-
29
- - git checkout -b test-branch
30
- - add, commit, etc
31
- - add assets last
32
-
33
- - git format-patch master --stdout > p.patch
34
-
35
- - actor.date.uuid
36
-
37
- -
38
- a:~/git/ahoward/ro $ git apply --stat p.patch
39
- tmp/coat.zip | Bin
40
- tmp/a.txt | 1 +
41
- 2 files changed, 1 insertion(+)
42
-
43
- - git apply --check p.patch
44
-
45
- - git am --signoff < fix_empty_poster.patch
46
-
47
- - iff fail: sorry, your edits conflict with another user!
48
- - because they need to review new content ;-)
49
-
50
- - git branch -D test-branch
data/lib/ro/blankslate.rb DELETED
@@ -1,7 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
-
3
- module Ro
4
- class BlankSlate
5
- instance_methods.each{|m| undef_method(m) unless m.to_s =~ /(^__)|object_id/}
6
- end
7
- end
data/lib/ro/cache.rb DELETED
@@ -1,26 +0,0 @@
1
- module Ro
2
- class Cache < ::Map
3
- def write(key, value)
4
- invalidate(key)
5
- set(key => value)
6
- end
7
-
8
- def read(key, &block)
9
- if has?(key)
10
- get(key)
11
- else
12
- if block
13
- value = block.call
14
- write(key, value)
15
- else
16
- nil
17
- end
18
- end
19
- end
20
-
21
- def invalidate(key)
22
- prefix = Array(key).dup.tap{|array| array.pop}
23
- set(prefix, {})
24
- end
25
- end
26
- end