social_snippet 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +3 -0
- data/Gemfile +1 -26
- data/README.md +1 -0
- data/lib/social_snippet.rb +1 -0
- data/lib/social_snippet/api.rb +120 -36
- data/lib/social_snippet/command_line/sspm/main_command.rb +1 -1
- data/lib/social_snippet/command_line/sspm/sub_commands.rb +1 -0
- data/lib/social_snippet/command_line/sspm/sub_commands/init_command.rb +27 -0
- data/lib/social_snippet/core.rb +3 -10
- data/lib/social_snippet/inserter.rb +1 -1
- data/lib/social_snippet/repository/repository_manager.rb +1 -1
- data/lib/social_snippet/resolvers/dep_resolver.rb +1 -1
- data/lib/social_snippet/resolvers/insert_resolver.rb +18 -6
- data/lib/social_snippet/snippet.rb +2 -2
- data/lib/social_snippet/tag_parser.rb +2 -2
- data/lib/social_snippet/tsortable_hash.rb +18 -0
- data/lib/social_snippet/version.rb +1 -1
- data/social_snippet.gemspec +10 -6
- data/spec/lib/command_line/sspm_init_spec.rb +21 -0
- data/spec/lib/core_spec.rb +6 -6
- data/spec/lib/insert_resolver_spec.rb +131 -0
- data/spec/lib/inserter_spec.rb +7 -7
- data/spec/lib/repository/base_repository_spec.rb +2 -2
- data/spec/lib/repository/repository_manager_spec.rb +2 -2
- data/test/base_repository_test.rb +4 -4
- data/test/core_test.rb +163 -163
- data/test/tag_parser_test.rb +2 -2
- metadata +33 -41
data/test/tag_parser_test.rb
CHANGED
@@ -11,7 +11,7 @@ describe SocialSnippet::TagParser do
|
|
11
11
|
"// @snip <path/to/file1.c>",
|
12
12
|
"// @snip <path/to/file2.c>",
|
13
13
|
"// @snippet <path/to/file3.c>",
|
14
|
-
].join(
|
14
|
+
].join($/)
|
15
15
|
end
|
16
16
|
|
17
17
|
context "result" do
|
@@ -32,7 +32,7 @@ describe SocialSnippet::TagParser do
|
|
32
32
|
"// @snip <path/to/file1.c>",
|
33
33
|
"// @snip <path/to/file2.c>",
|
34
34
|
"// @snippet <path/to/file3.c>",
|
35
|
-
].join(
|
35
|
+
].join($/)
|
36
36
|
end
|
37
37
|
|
38
38
|
context "result" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_snippet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroyuki Sano
|
@@ -11,83 +11,69 @@ cert_chain: []
|
|
11
11
|
date: 2015-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: version_sorter
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.1.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rugged
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ! '>='
|
31
|
+
- - ~>
|
39
32
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: version_sorter
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
33
|
+
version: 0.21.4
|
45
34
|
- - ! '>='
|
46
35
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
36
|
+
version: 0.21.4
|
48
37
|
type: :runtime
|
49
38
|
prerelease: false
|
50
39
|
version_requirements: !ruby/object:Gem::Requirement
|
51
40
|
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.21.4
|
52
44
|
- - ! '>='
|
53
45
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
46
|
+
version: 0.21.4
|
55
47
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
48
|
+
name: rest-client
|
57
49
|
requirement: !ruby/object:Gem::Requirement
|
58
50
|
requirements:
|
59
51
|
- - ~>
|
60
52
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
- - ! '>='
|
63
|
-
- !ruby/object:Gem::Version
|
64
|
-
version: 0.21.4
|
53
|
+
version: 1.7.0
|
65
54
|
type: :runtime
|
66
55
|
prerelease: false
|
67
56
|
version_requirements: !ruby/object:Gem::Requirement
|
68
57
|
requirements:
|
69
58
|
- - ~>
|
70
59
|
- !ruby/object:Gem::Version
|
71
|
-
version:
|
72
|
-
- - ! '>='
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: 0.21.4
|
60
|
+
version: 1.7.0
|
75
61
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
62
|
+
name: highline
|
77
63
|
requirement: !ruby/object:Gem::Requirement
|
78
64
|
requirements:
|
79
|
-
- -
|
65
|
+
- - ~>
|
80
66
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
67
|
+
version: 1.6.0
|
82
68
|
type: :runtime
|
83
69
|
prerelease: false
|
84
70
|
version_requirements: !ruby/object:Gem::Requirement
|
85
71
|
requirements:
|
86
|
-
- -
|
72
|
+
- - ~>
|
87
73
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
74
|
+
version: 1.6.0
|
89
75
|
- !ruby/object:Gem::Dependency
|
90
|
-
name:
|
76
|
+
name: bundler
|
91
77
|
requirement: !ruby/object:Gem::Requirement
|
92
78
|
requirements:
|
93
79
|
- - ! '>='
|
@@ -101,7 +87,7 @@ dependencies:
|
|
101
87
|
- !ruby/object:Gem::Version
|
102
88
|
version: '0'
|
103
89
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
90
|
+
name: rake
|
105
91
|
requirement: !ruby/object:Gem::Requirement
|
106
92
|
requirements:
|
107
93
|
- - ! '>='
|
@@ -115,7 +101,7 @@ dependencies:
|
|
115
101
|
- !ruby/object:Gem::Version
|
116
102
|
version: '0'
|
117
103
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
104
|
+
name: yard
|
119
105
|
requirement: !ruby/object:Gem::Requirement
|
120
106
|
requirements:
|
121
107
|
- - ! '>='
|
@@ -129,7 +115,7 @@ dependencies:
|
|
129
115
|
- !ruby/object:Gem::Version
|
130
116
|
version: '0'
|
131
117
|
- !ruby/object:Gem::Dependency
|
132
|
-
name: guard
|
118
|
+
name: guard
|
133
119
|
requirement: !ruby/object:Gem::Requirement
|
134
120
|
requirements:
|
135
121
|
- - ! '>='
|
@@ -143,7 +129,7 @@ dependencies:
|
|
143
129
|
- !ruby/object:Gem::Version
|
144
130
|
version: '0'
|
145
131
|
- !ruby/object:Gem::Dependency
|
146
|
-
name:
|
132
|
+
name: guard-shell
|
147
133
|
requirement: !ruby/object:Gem::Requirement
|
148
134
|
requirements:
|
149
135
|
- - ! '>='
|
@@ -243,6 +229,7 @@ files:
|
|
243
229
|
- lib/social_snippet/command_line/sspm/sub_commands/complete_command.rb
|
244
230
|
- lib/social_snippet/command_line/sspm/sub_commands/config_command.rb
|
245
231
|
- lib/social_snippet/command_line/sspm/sub_commands/info_command.rb
|
232
|
+
- lib/social_snippet/command_line/sspm/sub_commands/init_command.rb
|
246
233
|
- lib/social_snippet/command_line/sspm/sub_commands/install_command.rb
|
247
234
|
- lib/social_snippet/command_line/sspm/sub_commands/publish_command.rb
|
248
235
|
- lib/social_snippet/command_line/sspm/sub_commands/search_command.rb
|
@@ -272,6 +259,7 @@ files:
|
|
272
259
|
- lib/social_snippet/snippet.rb
|
273
260
|
- lib/social_snippet/tag.rb
|
274
261
|
- lib/social_snippet/tag_parser.rb
|
262
|
+
- lib/social_snippet/tsortable_hash.rb
|
275
263
|
- lib/social_snippet/version.rb
|
276
264
|
- social_snippet.gemspec
|
277
265
|
- spec/helpers/codeclimate_helper.rb
|
@@ -279,12 +267,14 @@ files:
|
|
279
267
|
- spec/helpers/webmock_helper.rb
|
280
268
|
- spec/lib/api_spec.rb
|
281
269
|
- spec/lib/command_line/sspm_config_spec.rb
|
270
|
+
- spec/lib/command_line/sspm_init_spec.rb
|
282
271
|
- spec/lib/command_line/sspm_install_spec.rb
|
283
272
|
- spec/lib/command_line/sspm_search_spec.rb
|
284
273
|
- spec/lib/command_line/sspm_spec.rb
|
285
274
|
- spec/lib/config_spec.rb
|
286
275
|
- spec/lib/context_spec.rb
|
287
276
|
- spec/lib/core_spec.rb
|
277
|
+
- spec/lib/insert_resolver_spec.rb
|
288
278
|
- spec/lib/inserter_spec.rb
|
289
279
|
- spec/lib/registry_client_spec.rb
|
290
280
|
- spec/lib/repository/base_repository_spec.rb
|
@@ -336,12 +326,14 @@ test_files:
|
|
336
326
|
- spec/helpers/webmock_helper.rb
|
337
327
|
- spec/lib/api_spec.rb
|
338
328
|
- spec/lib/command_line/sspm_config_spec.rb
|
329
|
+
- spec/lib/command_line/sspm_init_spec.rb
|
339
330
|
- spec/lib/command_line/sspm_install_spec.rb
|
340
331
|
- spec/lib/command_line/sspm_search_spec.rb
|
341
332
|
- spec/lib/command_line/sspm_spec.rb
|
342
333
|
- spec/lib/config_spec.rb
|
343
334
|
- spec/lib/context_spec.rb
|
344
335
|
- spec/lib/core_spec.rb
|
336
|
+
- spec/lib/insert_resolver_spec.rb
|
345
337
|
- spec/lib/inserter_spec.rb
|
346
338
|
- spec/lib/registry_client_spec.rb
|
347
339
|
- spec/lib/repository/base_repository_spec.rb
|