gast 0.0.8 → 0.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c76e56576ccffbd53ce37ad4435ff10fb77dbfe
4
- data.tar.gz: 480980571d4a12a68d4039b1572a3297073d627f
3
+ metadata.gz: 1661d5544fa9ea31a8f10ecedfff23a98e42ca82
4
+ data.tar.gz: 7e0d04f8b903c95dbda3a30031522538ae450f98
5
5
  SHA512:
6
- metadata.gz: e6743a9590249e60d166f427eaeeb0f2b300cb8368ad17630d46a5d5117e1275dcc4cde464f9e98c6a5012f9e1c24c5040bcbbb59dbc70e3e528a60f64a799ea
7
- data.tar.gz: 492009ee035e492695fb47ba31fa8ad451026029fcafd97898feeab88c38917071dda5a685d5488d46d99a14072272d5f629d5e17197faaa650aea5730f34f07
6
+ metadata.gz: 0a21c35331f827585c016f08fcd03762bb03111f6e9f6481190166dc43a900c3d3b9be12c99f8e496da7af7e38356944bfa3159eab634e88cabdf63b373e1611
7
+ data.tar.gz: cd7ed0038dd1349c7ef6c5397957d22a53e561f70d08911de49276329ab166944fcf009226bf3383a3198c68e1f4dd3fb7cd047854abfda1c34227a3519dac05
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ [![Stories in Ready](https://badge.waffle.io/futoase/gast.png?label=ready&title=Ready)](https://waffle.io/futoase/gast)
1
2
  # Gast
2
3
 
3
4
  [![Build Status](https://travis-ci.org/futoase/gast.svg?branch=feature/support-travis)](https://travis-ci.org/futoase/gast)
data/gast.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["futoase@gmail.com"]
11
11
  spec.summary = %q{memo application of using git}
12
12
  spec.description = %q{memo application of using git}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/futoase/gast"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
data/lib/gast/memo.rb CHANGED
@@ -70,7 +70,10 @@ module Gast
70
70
 
71
71
  def lists
72
72
  Dir.glob(File.expand_path(Gast::PATH + '/**')).map do |dir|
73
- dir.split('/').last
73
+ {
74
+ content_id: dir.split('/').last,
75
+ updated_at: File.stat(dir + '/content').mtime
76
+ }
74
77
  end
75
78
  end
76
79
  module_function :lists
@@ -1,7 +1,17 @@
1
1
  %h1
2
2
  Items
3
- %ul{ class: "list-group" }
4
- - @lists.each do |list|
5
- %li{ class: "list-group-item" }
6
- %a{ href: url("/posts/view/#{list}") }
7
- = list
3
+ %table{ class: "table table-striped" }
4
+ %thead
5
+ %tr
6
+ %th
7
+ Content ID
8
+ %th
9
+ Updated At
10
+ %tbody
11
+ - @lists.each do |list|
12
+ %tr
13
+ %td
14
+ %a{ href: url("/posts/view/#{list[:content_id]}") }
15
+ = list[:content_id]
16
+ %td
17
+ = list[:updated_at]
data/lib/gast/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gast
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -2,10 +2,6 @@ require 'spec_helper'
2
2
 
3
3
  describe Gast::App do
4
4
 
5
- def app
6
- Gast::App
7
- end
8
-
9
5
  let(:hello_world) { 'Hello World' }
10
6
  let(:welcome_to_underground) { 'Welcome to underground' }
11
7
  let(:inline_html) { "<script>alert('Hello world!');</script>" }
data/spec/memo_spec.rb CHANGED
@@ -11,4 +11,11 @@ describe Gast::Memo do
11
11
  end
12
12
  expect(Gast::Memo.number).to eq 10
13
13
  end
14
+
15
+ it 'should be get mtime of file in the list' do
16
+ Gast::Memo.create(welcome_to_underground)
17
+
18
+ get '/posts/list'
19
+ expect(last_response).to be_ok
20
+ end
14
21
  end
@@ -17,7 +17,7 @@ describe Gast::Repository do
17
17
  after(:each) { cleanup_in_the_dir }
18
18
 
19
19
  it 'should be create of repository' do
20
- expect(FileTest.exists?(repo.path)).to be_true
20
+ expect(FileTest.exists?(repo.path)).to be_truthy
21
21
  end
22
22
 
23
23
  it 'should be content is a Hello world' do
data/spec/spec_helper.rb CHANGED
@@ -42,6 +42,11 @@ RSpec.configure do |config|
42
42
  config.order = 'random'
43
43
  end
44
44
 
45
+ def app
46
+ Gast::App
47
+ end
48
+
49
+
45
50
  def get_fixture(name)
46
51
  File.read(File.expand_path('./fixtures/' + name, __dir__))
47
52
  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.8
4
+ version: 0.0.9
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-28 00:00:00.000000000 Z
11
+ date: 2014-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -267,7 +267,7 @@ files:
267
267
  - spec/memo_spec.rb
268
268
  - spec/repository_spec.rb
269
269
  - spec/spec_helper.rb
270
- homepage: ''
270
+ homepage: https://github.com/futoase/gast
271
271
  licenses:
272
272
  - MIT
273
273
  metadata: {}