gisture 0.0.7 → 0.0.8

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: 3bdea019b5a0fbb8b6ae761da872e410309450ed
4
- data.tar.gz: a2e957a0da22cfda85e7b10376fe0895a90ca1c2
3
+ metadata.gz: eff3867b98cd4f91cd816b80166b3a6761e6db77
4
+ data.tar.gz: 2799910dab4a2dab134173c25fe89451c19fd798
5
5
  SHA512:
6
- metadata.gz: 69d3b4ec1d28e33326d7b79452bc90b9aea5011f237f7154e89209ac54be2d565284c9076424b34cf4907249988cdcf8fb900eb25e444a7feb7d48c37f52c2e4
7
- data.tar.gz: 1038a6294c4eeffb1dfc24c6f2ba3528f2b974050a39681fda8d4654675f5b32c9bc103a40715ca0fd19586883ab1d34d6668724598c5e32e6ddb14fa5ac0b99
6
+ metadata.gz: 52a916183c9a8c6d2b828a8a12c1e28acc9d55b381b411d6c4b0241f6788a75bc7a55fdaf7a3db1246f11c269412fd773505c5cb2923aead113fb76ef3b3a5fe
7
+ data.tar.gz: 901ef651cb25079f268b7696359d9df52ed2786b23264696b234377023c2ac1eceb7259f66257cb24cfc8d650b9bbb14c331fee2d38b87fad40f6470bb065a47
@@ -1,3 +1,3 @@
1
1
  module Gisture
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
data/lib/gisture.rb CHANGED
@@ -37,11 +37,11 @@ module Gisture
37
37
  end
38
38
 
39
39
  def self.gist(gist, strategy: nil, filename: nil, version: nil)
40
- new(gist, strategy, filename, version)
40
+ new(gist, strategy: strategy, filename: filename, version: version)
41
41
  end
42
42
 
43
43
  def self.run(gist, strategy: nil, filename: nil, version: nil, &block)
44
- new(gist, strategy, filename, version).run!(&block)
44
+ new(gist, strategy: strategy, filename: filename, version: version).run!(&block)
45
45
  end
46
46
 
47
47
  def self.repo(repo)
data/spec/gisture_spec.rb CHANGED
@@ -1,8 +1,62 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe Gisture do
4
- SAMPLE_GIST_ID = "c3b478ef0592eacad361".freeze
5
- SAMPLE_GIST_VERSION = "7714df11a3babaa78f27027844ac2f0c1a8348c1".freeze
6
- SAMPLE_GIST_URL = "https://gist.github.com/markrebec/#{SAMPLE_GIST_ID}".freeze
7
- SAMPLE_GIST_URL_WITH_VERSION = "https://gist.github.com/markrebec/#{SAMPLE_GIST_ID}/#{SAMPLE_GIST_VERSION}".freeze
4
+ describe '.new' do
5
+ it 'returns a new Gisture::Gist' do
6
+ expect(Gisture.new(TEST_GIST_ID)).to be_a(Gisture::Gist)
7
+ end
8
+
9
+ context 'with arguments' do
10
+ it 'passes the arguments to the gist' do
11
+ gist = Gisture.new(TEST_GIST_ID, filename: TEST_GIST_FILENAME, strategy: :require, version: TEST_GIST_VERSION)
12
+ expect(gist.filename).to eql(TEST_GIST_FILENAME)
13
+ expect(gist.strategy).to eql(:require)
14
+ expect(gist.version).to eql(TEST_GIST_VERSION)
15
+ end
16
+ end
17
+ end
18
+
19
+ describe '.gist' do
20
+ it 'returns a new Gisture::Gist' do
21
+ expect(Gisture.gist(TEST_GIST_ID)).to be_a(Gisture::Gist)
22
+ end
23
+
24
+ context 'with arguments' do
25
+ it 'passes the arguments to the gist' do
26
+ gist = Gisture.gist(TEST_GIST_ID, filename: TEST_GIST_FILENAME, strategy: :require, version: TEST_GIST_VERSION)
27
+ expect(gist.filename).to eql(TEST_GIST_FILENAME)
28
+ expect(gist.strategy).to eql(:require)
29
+ expect(gist.version).to eql(TEST_GIST_VERSION)
30
+ end
31
+ end
32
+ end
33
+
34
+ # TODO should test that the file receives a call to run!
35
+ describe '.run' do
36
+ it 'creates and runs a new Gisture::Gist' do
37
+ expect { Gisture.run(TEST_GIST_ID) }.to_not raise_exception
38
+ end
39
+
40
+ context 'with arguments' do
41
+ it 'passes the arguments to the gist' do
42
+ # TODO stub Github::Client::Gists.version
43
+ #expect { Gisture.run(TEST_GIST_ID, filename: TEST_GIST_FILENAME, strategy: :require, version: TEST_GIST_VERSION) }.to_not raise_exception
44
+ expect { Gisture.run(TEST_GIST_ID, filename: TEST_GIST_FILENAME, strategy: :require) }.to_not raise_exception
45
+ end
46
+ end
47
+ end
48
+
49
+ describe '.repo' do
50
+ it 'returns a new Gisture::Repo' do
51
+ # TODO stub out Github::Client::Repos
52
+ #expect(Gisture.repo('markrebec/gisture')).to be_a(Gisture::Repo)
53
+ end
54
+ end
55
+
56
+ describe '.file' do
57
+ it 'returns a new Gisture::File' do
58
+ # TODO stub out Github::Client::Repos::Contents
59
+ #expect(Gisture.file('https://github.com/markrebec/gisture/blob/master/lib/gisture.rb')).to be_a(Gisture::File)
60
+ end
61
+ end
8
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gisture
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-11 00:00:00.000000000 Z
11
+ date: 2015-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: canfig