easy-auto 0.0.2 → 0.1.0
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/easy-auto.gemspec +1 -0
- data/lib/easy_auto/authorize.rb +5 -3
- data/lib/easy_auto/config_manager_wrapper.rb +2 -2
- data/lib/easy_auto/version.rb +1 -1
- metadata +17 -4
- data/lib/easy_auto/config_manager.rb +0 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dca8d1b438beb23123e1543badb53fc151a37bbf
|
4
|
+
data.tar.gz: 8bd09ac9a4f68a5478313924314ca60062cd7aa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eaf8302161a39925b80c10522734b3c1f107c1e12a4c03a148f1f637d8b7e465069bc3011b5b464bf1c07cb3ed649f9f0c1394644332825fa54d1dc2a83f072a
|
7
|
+
data.tar.gz: bc2fcbad9c35222faaf40b7f2e15ae12a20037fec77d71a595265dce23504c9815724c217fd17b4a80612868f92ff1199f556b7c93acc3ad3a4d96e9c74b0334
|
data/easy-auto.gemspec
CHANGED
data/lib/easy_auto/authorize.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'json'
|
2
|
+
require 'general_store'
|
2
3
|
require 'easy_auto/system_helper'
|
3
|
-
require 'easy_auto/config_manager_wrapper'
|
4
4
|
require 'easy_auto/easy_utilities'
|
5
5
|
|
6
6
|
module EasyAuto
|
@@ -19,8 +19,10 @@ module EasyAuto
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def store_token
|
22
|
-
|
23
|
-
|
22
|
+
GeneralStore.create '~/.easy-auto' do |gs|
|
23
|
+
gs.github_email = email
|
24
|
+
gs.github_token = token
|
25
|
+
end
|
24
26
|
end
|
25
27
|
|
26
28
|
def get_credentials
|
data/lib/easy_auto/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy-auto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Nelson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: general_store
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Easy access to git commands
|
56
70
|
email:
|
57
71
|
- stuartnelson3@gmail.com
|
@@ -78,7 +92,6 @@ files:
|
|
78
92
|
- lib/easy_auto.rb
|
79
93
|
- lib/easy_auto/authorize.rb
|
80
94
|
- lib/easy_auto/client_wrapper.rb
|
81
|
-
- lib/easy_auto/config_manager.rb
|
82
95
|
- lib/easy_auto/config_manager_wrapper.rb
|
83
96
|
- lib/easy_auto/create_branch.rb
|
84
97
|
- lib/easy_auto/create_repo.rb
|
@@ -122,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
135
|
version: '0'
|
123
136
|
requirements: []
|
124
137
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.1.5
|
126
139
|
signing_key:
|
127
140
|
specification_version: 4
|
128
141
|
summary: Use the command line to simplify interacting with git
|
@@ -1,60 +0,0 @@
|
|
1
|
-
require 'yaml'
|
2
|
-
|
3
|
-
module EasyAuto
|
4
|
-
class ConfigManager
|
5
|
-
attr_accessor :config
|
6
|
-
attr_accessor :github_email
|
7
|
-
attr_accessor :github_token
|
8
|
-
|
9
|
-
def initialize config_contents
|
10
|
-
self.config = config_contents
|
11
|
-
config.each do |k,v|
|
12
|
-
# e.g., foo: "bar" translates to self.foo = "bar"
|
13
|
-
setter = "#{k}="
|
14
|
-
send(setter, v) if respond_to? setter
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.read_yml
|
19
|
-
new load_config
|
20
|
-
end
|
21
|
-
|
22
|
-
def set key, value
|
23
|
-
send("#{key}=", value)
|
24
|
-
config.merge!(key => value)
|
25
|
-
File.write self.class.config_file, YAML.dump(config)
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.load_config
|
29
|
-
YAML.load_file config_file
|
30
|
-
rescue Errno::ENOENT
|
31
|
-
create_config_file
|
32
|
-
{}
|
33
|
-
end
|
34
|
-
|
35
|
-
def self.create_config_file
|
36
|
-
check_dir_existence
|
37
|
-
check_file_existence
|
38
|
-
end
|
39
|
-
|
40
|
-
def self.check_dir_existence
|
41
|
-
unless Dir.exists? config_dir
|
42
|
-
Dir.mkdir config_dir
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
def self.config_dir
|
47
|
-
File.expand_path "~/.easy-auto"
|
48
|
-
end
|
49
|
-
|
50
|
-
def self.check_file_existence
|
51
|
-
unless File.exists? config_file
|
52
|
-
File.write config_file, YAML.dump({})
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def self.config_file
|
57
|
-
File.join config_dir, "config.yml"
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|