gast 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Guardfile +1 -0
- data/README.md +1 -0
- data/config/languages.yml +71 -0
- data/gast.gemspec +1 -0
- data/lib/gast/app.rb +6 -0
- data/lib/gast/templates/form_area.haml +1 -5
- data/lib/gast/templates/languages.haml +4 -0
- data/lib/gast/version.rb +1 -1
- data/lib/gast.rb +1 -0
- data/spec/feature/index_spec.rb +10 -0
- data/spec/spec_helper.rb +7 -0
- metadata +20 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc3ee213f4e5d86b1bc8a6dc8b6b4da7810421ed
|
4
|
+
data.tar.gz: 2c68262859282689cf90740a7b537ecb3d27b8dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0886827a727068ae5cbc01049d8ad4ef534d4541be3fa7f0813d634a55351558d004482cf7e98dcad62c4b68bd233946b8302dee7b133a0b93fa85edc31e1da1
|
7
|
+
data.tar.gz: 6af61f29398256d0df3985e9c0420623be58db8828db6900d1915f73b8ace6dc49cf978099b0ea6a355a445edced309ec92bef2cd15f8aedc45eaafb197153c2
|
data/Guardfile
CHANGED
@@ -13,6 +13,7 @@ end
|
|
13
13
|
guard :rspec, cmd: 'bundle ex rspec' do
|
14
14
|
watch(%r{^spec/.+_spec\.rb$})
|
15
15
|
watch('spec/spec_helper.rb') { "spec" }
|
16
|
+
watch(%r{spec/feature/.+.rb$})
|
16
17
|
|
17
18
|
watch(%r{^lib/gast/app.rb$}) { |m| "spec/controller_spec.rb" }
|
18
19
|
watch(%r{^lib/gast/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
data/README.md
CHANGED
@@ -0,0 +1,71 @@
|
|
1
|
+
- python
|
2
|
+
- ruby
|
3
|
+
- haml
|
4
|
+
- perl
|
5
|
+
- php
|
6
|
+
- scala
|
7
|
+
- go
|
8
|
+
- xml
|
9
|
+
- lasso
|
10
|
+
- markdown
|
11
|
+
- asciidoc
|
12
|
+
- django
|
13
|
+
- handlebars
|
14
|
+
- css
|
15
|
+
- scss
|
16
|
+
- json
|
17
|
+
- javascript
|
18
|
+
- coffeescript
|
19
|
+
- actionscript
|
20
|
+
- vbscript
|
21
|
+
- vbnet
|
22
|
+
- http
|
23
|
+
- lua
|
24
|
+
- applescript
|
25
|
+
- delphi
|
26
|
+
- oxygene
|
27
|
+
- java
|
28
|
+
- cpp
|
29
|
+
- objectivec
|
30
|
+
- vala
|
31
|
+
- cs
|
32
|
+
- fsharp
|
33
|
+
- ocaml
|
34
|
+
- d
|
35
|
+
- rsl
|
36
|
+
- rib
|
37
|
+
- mel
|
38
|
+
- glsl
|
39
|
+
- sql
|
40
|
+
- smalltalk
|
41
|
+
- lisp
|
42
|
+
- clojure
|
43
|
+
- ini
|
44
|
+
- apache
|
45
|
+
- nginx
|
46
|
+
- diff
|
47
|
+
- dos
|
48
|
+
- bash
|
49
|
+
- makefile
|
50
|
+
- cmake
|
51
|
+
- axapta
|
52
|
+
- ruleslanguage
|
53
|
+
- 1c
|
54
|
+
- avasm
|
55
|
+
- vhdl
|
56
|
+
- parser3
|
57
|
+
- livecodeserver
|
58
|
+
- tex
|
59
|
+
- brainfuck
|
60
|
+
- haskell
|
61
|
+
- erlang
|
62
|
+
- erlang-repl
|
63
|
+
- rust
|
64
|
+
- matlab
|
65
|
+
- scilab
|
66
|
+
- r
|
67
|
+
- mizar
|
68
|
+
- mathematica
|
69
|
+
- profile
|
70
|
+
- autohotkey
|
71
|
+
- fix
|
data/gast.gemspec
CHANGED
@@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_development_dependency "webmock"
|
34
34
|
spec.add_development_dependency "rspec"
|
35
35
|
spec.add_development_dependency "rack-test"
|
36
|
+
spec.add_development_dependency "capybara"
|
36
37
|
spec.add_development_dependency "pry"
|
37
38
|
spec.add_development_dependency "pry-remote"
|
38
39
|
end
|
data/lib/gast/app.rb
CHANGED
@@ -30,6 +30,12 @@ module Gast
|
|
30
30
|
include Sprockets::Helpers
|
31
31
|
end
|
32
32
|
|
33
|
+
before do
|
34
|
+
@languages = YAML.load_file(
|
35
|
+
File.expand_path('../../config/languages.yml', __dir__)
|
36
|
+
)
|
37
|
+
end
|
38
|
+
|
33
39
|
before %r{/posts/\w+/(\w+)} do |id|
|
34
40
|
unless /[a-zA-Z0-9]{30}/ =~ id.to_s
|
35
41
|
halt haml(:error, locals: { message: "error is format of id" })
|
@@ -1,9 +1,5 @@
|
|
1
1
|
.form-group
|
2
|
-
|
3
|
-
%option{ value: "python" }
|
4
|
-
python
|
5
|
-
%option{ value: "ruby"}
|
6
|
-
ruby
|
2
|
+
= haml :languages
|
7
3
|
= preserve do
|
8
4
|
%textarea{ class: "form-control", style: "margin-top: 10px; height: 30em;", name: "content", wrap: "hard" }
|
9
5
|
= @item
|
data/lib/gast/version.rb
CHANGED
data/lib/gast.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -18,6 +18,7 @@ $:.unshift File.realpath(File.dirname(__FILE__) + '/../lib')
|
|
18
18
|
require 'rspec'
|
19
19
|
require 'rack/test'
|
20
20
|
require 'webmock/rspec'
|
21
|
+
require 'capybara/rspec'
|
21
22
|
|
22
23
|
require 'sinatra'
|
23
24
|
require 'timecop'
|
@@ -29,6 +30,8 @@ require 'gast/app'
|
|
29
30
|
require 'gast/memo'
|
30
31
|
require 'gast/repository'
|
31
32
|
|
33
|
+
Capybara.app = Gast::App.new
|
34
|
+
|
32
35
|
include Rack::Test::Methods
|
33
36
|
|
34
37
|
RSpec.configure do |config|
|
@@ -42,3 +45,7 @@ end
|
|
42
45
|
def get_fixture(name)
|
43
46
|
File.read(File.expand_path('./fixtures/' + name, __dir__))
|
44
47
|
end
|
48
|
+
|
49
|
+
def get_languages
|
50
|
+
YAML.load_file(File.expand_path('../config/languages.yml', __dir__))
|
51
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- futoase
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -206,6 +206,20 @@ dependencies:
|
|
206
206
|
- - ">="
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: capybara
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
209
223
|
- !ruby/object:Gem::Dependency
|
210
224
|
name: pry
|
211
225
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,6 +266,7 @@ files:
|
|
252
266
|
- Rakefile
|
253
267
|
- bin/gast
|
254
268
|
- config.ru
|
269
|
+
- config/languages.yml
|
255
270
|
- gast.gemspec
|
256
271
|
- lib/gast.rb
|
257
272
|
- lib/gast/app.rb
|
@@ -263,6 +278,7 @@ files:
|
|
263
278
|
- lib/gast/templates/form_area.haml
|
264
279
|
- lib/gast/templates/header.haml
|
265
280
|
- lib/gast/templates/index.haml
|
281
|
+
- lib/gast/templates/languages.haml
|
266
282
|
- lib/gast/templates/layout.haml
|
267
283
|
- lib/gast/templates/list.haml
|
268
284
|
- lib/gast/templates/navbar.haml
|
@@ -271,6 +287,7 @@ files:
|
|
271
287
|
- lib/gast/templates/view.haml
|
272
288
|
- lib/gast/version.rb
|
273
289
|
- spec/controller_spec.rb
|
290
|
+
- spec/feature/index_spec.rb
|
274
291
|
- spec/fixtures/sample_of_code.rb
|
275
292
|
- spec/memo_spec.rb
|
276
293
|
- spec/repository_spec.rb
|
@@ -301,6 +318,7 @@ specification_version: 4
|
|
301
318
|
summary: memo application of using git
|
302
319
|
test_files:
|
303
320
|
- spec/controller_spec.rb
|
321
|
+
- spec/feature/index_spec.rb
|
304
322
|
- spec/fixtures/sample_of_code.rb
|
305
323
|
- spec/memo_spec.rb
|
306
324
|
- spec/repository_spec.rb
|