woro-gist 0.0.1
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 +7 -0
- data/.gitignore +35 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +47 -0
- data/LICENSE +22 -0
- data/README.md +41 -0
- data/Rakefile +2 -0
- data/lib/woro-gist.rb +3 -0
- data/lib/woro-gist/version.rb +5 -0
- data/lib/woro/adapters/gist.rb +110 -0
- data/spec/fixtures/gist.json +103 -0
- data/spec/lib/woro/adapters/gist_spec.rb +79 -0
- data/spec/spec_helper.rb +18 -0
- data/woro-gist.gemspec +26 -0
- metadata +116 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 643eaa81aee0d983238690df7c9f3534e43b3f96
|
4
|
+
data.tar.gz: 9856ec3430ac581577ae01578bc7ad05a323b4ed
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ca13de04ae2566f9886e2ad8ea627729de594e535a8d2a95b34b2e1f6cf8d8b40ab9b60e08d2880ffdbb389d5d65a280db0e3c0fd327185c2a01bb0422045257
|
7
|
+
data.tar.gz: d4bec4ab91e623f3d54de8f79c6b63525358dc606e829b29b8377ccca97cea987a1e502e9703fc4a57ecce3bca7f93315ac049dc688c8d96a32ae6bab3ae1d70
|
data/.gitignore
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/vendor/bundle
|
26
|
+
/lib/bundler/man/
|
27
|
+
|
28
|
+
# for a library or gem, you might want to ignore these files since the code is
|
29
|
+
# intended to run in multiple environments; otherwise, check them in:
|
30
|
+
# Gemfile.lock
|
31
|
+
# .ruby-version
|
32
|
+
# .ruby-gemset
|
33
|
+
|
34
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
35
|
+
.rvmrc
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
woro-gist (0.0.1)
|
5
|
+
gist
|
6
|
+
woro
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
commander (4.3.3)
|
12
|
+
highline (~> 1.7.2)
|
13
|
+
diff-lcs (1.2.5)
|
14
|
+
fakefs (0.6.7)
|
15
|
+
gist (4.3.0)
|
16
|
+
highline (1.7.2)
|
17
|
+
rake (10.4.2)
|
18
|
+
rspec (3.3.0)
|
19
|
+
rspec-core (~> 3.3.0)
|
20
|
+
rspec-expectations (~> 3.3.0)
|
21
|
+
rspec-mocks (~> 3.3.0)
|
22
|
+
rspec-core (3.3.1)
|
23
|
+
rspec-support (~> 3.3.0)
|
24
|
+
rspec-expectations (3.3.0)
|
25
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
+
rspec-support (~> 3.3.0)
|
27
|
+
rspec-mocks (3.3.1)
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
+
rspec-support (~> 3.3.0)
|
30
|
+
rspec-nc (0.2.0)
|
31
|
+
rspec (>= 2.9)
|
32
|
+
terminal-notifier (>= 1.4)
|
33
|
+
rspec-support (3.3.0)
|
34
|
+
terminal-notifier (1.6.3)
|
35
|
+
woro (0.2.2)
|
36
|
+
commander
|
37
|
+
|
38
|
+
PLATFORMS
|
39
|
+
ruby
|
40
|
+
|
41
|
+
DEPENDENCIES
|
42
|
+
bundler (~> 1.7)
|
43
|
+
fakefs
|
44
|
+
rake (~> 10.0)
|
45
|
+
rspec
|
46
|
+
rspec-nc
|
47
|
+
woro-gist!
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Daniel Senff
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# woro-gist
|
2
|
+
|
3
|
+
Gist-Adapter for Woro remote task management
|
4
|
+
|
5
|
+
Using Github's gist, you keep version control of the tasks and can share them with colleagues.
|
6
|
+
|
7
|
+
## Woro adapters
|
8
|
+
|
9
|
+
## Usage
|
10
|
+
|
11
|
+
|
12
|
+
Once you are done writing the task and you want to execute it on the remote system.
|
13
|
+
First you have to push them online, in this case to Gist.
|
14
|
+
|
15
|
+
```shell
|
16
|
+
$ woro push gist:cleanup_users
|
17
|
+
```
|
18
|
+
|
19
|
+
_Attention, depending on whether you set up a Gist/Github login on
|
20
|
+
initialization. These tasks are online anonymous, but public, or
|
21
|
+
private under the specified Github account._
|
22
|
+
|
23
|
+
Now, to run a task remotely using Mina, specify the task:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
$ mina woro:run task=gist:cleanup_users
|
27
|
+
```
|
28
|
+
|
29
|
+
Or to run it with Capistrano:
|
30
|
+
|
31
|
+
```shell
|
32
|
+
$ cap woro:run task=gist:cleanup_users
|
33
|
+
```
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
1. Fork it
|
38
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
39
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
40
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
41
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
data/lib/woro-gist.rb
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
require 'gist'
|
2
|
+
|
3
|
+
module Woro
|
4
|
+
module Adapters
|
5
|
+
class Gist < Base
|
6
|
+
attr_reader :gist_id
|
7
|
+
|
8
|
+
# Setup configuration for adapter
|
9
|
+
# Highline CLI helpers can be used for interactivity.
|
10
|
+
# @return [Hash] Configuration options
|
11
|
+
def self.setup
|
12
|
+
if agree 'Login to Gist/Github for private Woro tasks (Yes/No)? '
|
13
|
+
::Gist.login!
|
14
|
+
end
|
15
|
+
|
16
|
+
# create Gist with welcome file
|
17
|
+
# additional tasks will be added to this first gist
|
18
|
+
begin
|
19
|
+
require File.join(Dir.pwd, 'config', 'application.rb')
|
20
|
+
app_name = Rails.application.class.parent_name
|
21
|
+
rescue LoadError
|
22
|
+
app_name = ask('Application name: ')
|
23
|
+
end
|
24
|
+
|
25
|
+
result = create_initial_remote_task(app_name)
|
26
|
+
|
27
|
+
{
|
28
|
+
gist_id: result['id'],
|
29
|
+
public: false
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create a new gist collection adapter
|
34
|
+
def initialize(options)
|
35
|
+
@gist_id = options['gist_id']
|
36
|
+
end
|
37
|
+
|
38
|
+
# Returns the list of files included in the Gist
|
39
|
+
# @return [Hash] List of files in the format { filename: { data }}
|
40
|
+
def list_files
|
41
|
+
gist['files'].keys
|
42
|
+
end
|
43
|
+
|
44
|
+
# Returns the list of rake files included in the remote collection
|
45
|
+
# with their contents.
|
46
|
+
# @return [Hash] List of files with their contents
|
47
|
+
def list_contents
|
48
|
+
gist['files']
|
49
|
+
end
|
50
|
+
|
51
|
+
# Push this task's file content to the Gist collection on the server.
|
52
|
+
# Existing contents by the same #file_name will be overriden, but
|
53
|
+
# can be accessed via Github or Gist's API.
|
54
|
+
def push(task)
|
55
|
+
::Gist.multi_gist({ task.file_name => task.read_task_file },
|
56
|
+
public: false,
|
57
|
+
update: gist_id,
|
58
|
+
output: :all)
|
59
|
+
end
|
60
|
+
|
61
|
+
# The raw url is a permalink for downloading the content rake task within
|
62
|
+
# the Gist as a file.
|
63
|
+
# @param file_name [String] name of the file to retrieve the download url
|
64
|
+
# @return [String] HTTP-URL of addressed file within the gist collection
|
65
|
+
def raw_url(file_name)
|
66
|
+
retrieve_file_data(file_name)['raw_url']
|
67
|
+
end
|
68
|
+
|
69
|
+
# Creates an initial welcome gist on project setup
|
70
|
+
# @param app_name [String] Name of the app is displayed in the
|
71
|
+
# initial welcome message
|
72
|
+
def self.create_initial_remote_task(app_name, access_token = nil)
|
73
|
+
::Gist.gist("Welcome to the Woro Task Repository for #{app_name}",
|
74
|
+
filename: app_name, access_token: access_token)
|
75
|
+
end
|
76
|
+
|
77
|
+
# Extract description from gist's data content string.
|
78
|
+
# @param data [Hash] gist data hash
|
79
|
+
# [String] description string
|
80
|
+
def extract_description(data)
|
81
|
+
Woro::TaskHelper.extract_description(data['content'])
|
82
|
+
end
|
83
|
+
|
84
|
+
protected
|
85
|
+
|
86
|
+
# The Gist contains a collection of files.
|
87
|
+
# These are stored and accessed on Github.
|
88
|
+
# @return [Hash] parsed JSON hash of the gist's metadata
|
89
|
+
def gist
|
90
|
+
@gist ||= retrieve_gist(gist_id)
|
91
|
+
end
|
92
|
+
|
93
|
+
# Retrieves metadata of the specified gist
|
94
|
+
# @param gist_id [String] id of the gist
|
95
|
+
# @return [Hash] parsed JSON hash
|
96
|
+
def retrieve_gist(gist_id)
|
97
|
+
service_url = "https://api.github.com/gists/#{gist_id}"
|
98
|
+
response = Net::HTTP.get_response(URI.parse(service_url))
|
99
|
+
JSON.parse(response.body || '')
|
100
|
+
end
|
101
|
+
|
102
|
+
# Retrieves the data hash included in the gist under the #file_name.
|
103
|
+
# @param file_name [String] name of the file to retrieve the download url
|
104
|
+
# @return [Hash] parsed JSON hash
|
105
|
+
def retrieve_file_data(file_name)
|
106
|
+
gist['files'][file_name]
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
{
|
2
|
+
"url": "https://api.github.com/gists/aa5a315d61ae9438b18d",
|
3
|
+
"forks_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/forks",
|
4
|
+
"commits_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/commits",
|
5
|
+
"id": "aa5a315d61ae9438b18d",
|
6
|
+
"description": "description of gist",
|
7
|
+
"public": true,
|
8
|
+
"owner": {
|
9
|
+
"login": "octocat",
|
10
|
+
"id": 1,
|
11
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
12
|
+
"gravatar_id": "",
|
13
|
+
"url": "https://api.github.com/users/octocat",
|
14
|
+
"html_url": "https://github.com/octocat",
|
15
|
+
"followers_url": "https://api.github.com/users/octocat/followers",
|
16
|
+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
|
17
|
+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
|
18
|
+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
|
19
|
+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
|
20
|
+
"organizations_url": "https://api.github.com/users/octocat/orgs",
|
21
|
+
"repos_url": "https://api.github.com/users/octocat/repos",
|
22
|
+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
|
23
|
+
"received_events_url": "https://api.github.com/users/octocat/received_events",
|
24
|
+
"type": "User",
|
25
|
+
"site_admin": false
|
26
|
+
},
|
27
|
+
"user": null,
|
28
|
+
"files": {
|
29
|
+
"create_user.rake": {
|
30
|
+
"size": 932,
|
31
|
+
"raw_url": "https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl",
|
32
|
+
"type": "text/plain",
|
33
|
+
"language": "Ruby",
|
34
|
+
"truncated": false,
|
35
|
+
"content": "namespace :woro do\n desc 'Create User'\n task create_user: :environment do\n # Code\n end\nend\n"
|
36
|
+
}
|
37
|
+
},
|
38
|
+
"comments": 0,
|
39
|
+
"comments_url": "https://api.github.com/gists/aa5a315d61ae9438b18d/comments/",
|
40
|
+
"html_url": "https://gist.github.com/aa5a315d61ae9438b18d",
|
41
|
+
"git_pull_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
|
42
|
+
"git_push_url": "https://gist.github.com/aa5a315d61ae9438b18d.git",
|
43
|
+
"created_at": "2010-04-14T02:15:15Z",
|
44
|
+
"updated_at": "2011-06-20T11:34:15Z",
|
45
|
+
"forks": [
|
46
|
+
{
|
47
|
+
"user": {
|
48
|
+
"login": "octocat",
|
49
|
+
"id": 1,
|
50
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
51
|
+
"gravatar_id": "",
|
52
|
+
"url": "https://api.github.com/users/octocat",
|
53
|
+
"html_url": "https://github.com/octocat",
|
54
|
+
"followers_url": "https://api.github.com/users/octocat/followers",
|
55
|
+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
|
56
|
+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
|
57
|
+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
|
58
|
+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
|
59
|
+
"organizations_url": "https://api.github.com/users/octocat/orgs",
|
60
|
+
"repos_url": "https://api.github.com/users/octocat/repos",
|
61
|
+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
|
62
|
+
"received_events_url": "https://api.github.com/users/octocat/received_events",
|
63
|
+
"type": "User",
|
64
|
+
"site_admin": false
|
65
|
+
},
|
66
|
+
"url": "https://api.github.com/gists/dee9c42e4998ce2ea439",
|
67
|
+
"id": "dee9c42e4998ce2ea439",
|
68
|
+
"created_at": "2011-04-14T16:00:49Z",
|
69
|
+
"updated_at": "2011-04-14T16:00:49Z"
|
70
|
+
}
|
71
|
+
],
|
72
|
+
"history": [
|
73
|
+
{
|
74
|
+
"url": "https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f",
|
75
|
+
"version": "57a7f021a713b1c5a6a199b54cc514735d2d462f",
|
76
|
+
"user": {
|
77
|
+
"login": "octocat",
|
78
|
+
"id": 1,
|
79
|
+
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
|
80
|
+
"gravatar_id": "",
|
81
|
+
"url": "https://api.github.com/users/octocat",
|
82
|
+
"html_url": "https://github.com/octocat",
|
83
|
+
"followers_url": "https://api.github.com/users/octocat/followers",
|
84
|
+
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
|
85
|
+
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
|
86
|
+
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
|
87
|
+
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
|
88
|
+
"organizations_url": "https://api.github.com/users/octocat/orgs",
|
89
|
+
"repos_url": "https://api.github.com/users/octocat/repos",
|
90
|
+
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
|
91
|
+
"received_events_url": "https://api.github.com/users/octocat/received_events",
|
92
|
+
"type": "User",
|
93
|
+
"site_admin": false
|
94
|
+
},
|
95
|
+
"change_status": {
|
96
|
+
"deletions": 0,
|
97
|
+
"additions": 180,
|
98
|
+
"total": 180
|
99
|
+
},
|
100
|
+
"committed_at": "2010-04-14T02:15:15Z"
|
101
|
+
}
|
102
|
+
]
|
103
|
+
}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
describe Woro::Adapters::Gist do
|
5
|
+
|
6
|
+
let!(:gist_id) { rand(999)}
|
7
|
+
let(:task) { Woro::Task.new('create_user') }
|
8
|
+
subject { Woro::Adapters::Gist.new(gist_id: gist_id) }
|
9
|
+
let(:gist_hash) do
|
10
|
+
FakeFS.deactivate!
|
11
|
+
body = File.read(File.join('spec', 'fixtures', 'gist.json'))
|
12
|
+
FakeFS.activate!
|
13
|
+
JSON.parse(body)
|
14
|
+
end
|
15
|
+
|
16
|
+
before do
|
17
|
+
allow(subject).to receive(:gist).once.and_return gist_hash
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#list_files' do
|
21
|
+
it 'returns list' do
|
22
|
+
expect(subject.list_files).to match ['create_user.rake']
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe '#list_contents' do
|
27
|
+
it 'returns list' do
|
28
|
+
expected_data = {
|
29
|
+
'create_user.rake' => {
|
30
|
+
"size" => 932,
|
31
|
+
"raw_url" => "https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl",
|
32
|
+
"type" => "text/plain",
|
33
|
+
"language" => "Ruby",
|
34
|
+
"truncated" => false,
|
35
|
+
"content" => "namespace :woro do\n desc 'Create User'\n task create_user: :environment do\n # Code\n end\nend\n"
|
36
|
+
}
|
37
|
+
}
|
38
|
+
expect(subject.list_contents).to eq expected_data
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe '#push' do
|
43
|
+
it 'calls gist services with correct params' do
|
44
|
+
File.open(task.file_path, 'w') do |f|
|
45
|
+
f.puts 'hey'
|
46
|
+
end
|
47
|
+
expected_files_hash = { task.file_name => task.read_task_file }
|
48
|
+
expected_params_hash = { public: false,
|
49
|
+
update: gist_id,
|
50
|
+
output: :all
|
51
|
+
}
|
52
|
+
expect(::Gist).to receive(:multi_gist)
|
53
|
+
.with(expected_files_hash, expected_params_hash)
|
54
|
+
.and_return gist_hash
|
55
|
+
subject.push(task)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe '#retrieve_file_data' do
|
60
|
+
it 'returns data hash from file' do
|
61
|
+
expected_hash = {
|
62
|
+
"size" => 932,
|
63
|
+
"raw_url" => "https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl",
|
64
|
+
"type" => "text/plain",
|
65
|
+
"language" => "Ruby",
|
66
|
+
"truncated" => false,
|
67
|
+
"content" => "namespace :woro do\n desc 'Create User'\n task create_user: :environment do\n # Code\n end\nend\n"
|
68
|
+
}
|
69
|
+
expect(subject.send(:retrieve_file_data, 'create_user.rake')).to eq expected_hash
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe '#raw_url' do
|
74
|
+
it 'returns raw_url of file' do
|
75
|
+
expected_url = "https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl"
|
76
|
+
expect(subject.raw_url('create_user.rake')).to eq expected_url
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'woro'
|
2
|
+
require 'woro-gist'
|
3
|
+
require 'fakefs/safe'
|
4
|
+
|
5
|
+
Dir[('./spec/support/**/*.rb')].each {|f| require f}
|
6
|
+
|
7
|
+
RSpec.configure do |config|
|
8
|
+
config.color = true
|
9
|
+
config.order = 'random'
|
10
|
+
|
11
|
+
config.before(:each) do
|
12
|
+
FakeFS.activate!
|
13
|
+
FileUtils.mkdir_p 'config'
|
14
|
+
FileUtils.mkdir_p 'lib/woro_tasks'
|
15
|
+
FileUtils.mkdir_p 'lib/tasks'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
data/woro-gist.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'woro-gist/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "woro-gist"
|
8
|
+
spec.version = Woro::Gist::VERSION
|
9
|
+
spec.authors = ["Daniel Senff"]
|
10
|
+
spec.email = ["mail@danielsenff.de"]
|
11
|
+
spec.summary = %q{Adapter to Github's Gist for use in Woro remote task management}
|
12
|
+
spec.description = %q{Adapter to Github's Gist for use in Woro remote task management}
|
13
|
+
spec.homepage = "http://github.com/Dahie/woro-gist"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "gist"
|
22
|
+
spec.add_dependency "woro"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: woro-gist
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel Senff
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-06-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: gist
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: woro
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
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
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.7'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
description: Adapter to Github's Gist for use in Woro remote task management
|
70
|
+
email:
|
71
|
+
- mail@danielsenff.de
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- Gemfile
|
78
|
+
- Gemfile.lock
|
79
|
+
- LICENSE
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- lib/woro-gist.rb
|
83
|
+
- lib/woro-gist/version.rb
|
84
|
+
- lib/woro/adapters/gist.rb
|
85
|
+
- spec/fixtures/gist.json
|
86
|
+
- spec/lib/woro/adapters/gist_spec.rb
|
87
|
+
- spec/spec_helper.rb
|
88
|
+
- woro-gist.gemspec
|
89
|
+
homepage: http://github.com/Dahie/woro-gist
|
90
|
+
licenses:
|
91
|
+
- MIT
|
92
|
+
metadata: {}
|
93
|
+
post_install_message:
|
94
|
+
rdoc_options: []
|
95
|
+
require_paths:
|
96
|
+
- lib
|
97
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
requirements: []
|
108
|
+
rubyforge_project:
|
109
|
+
rubygems_version: 2.4.6
|
110
|
+
signing_key:
|
111
|
+
specification_version: 4
|
112
|
+
summary: Adapter to Github's Gist for use in Woro remote task management
|
113
|
+
test_files:
|
114
|
+
- spec/fixtures/gist.json
|
115
|
+
- spec/lib/woro/adapters/gist_spec.rb
|
116
|
+
- spec/spec_helper.rb
|