xero-cli 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.MD +5 -5
- data/Rakefile +1 -1
- data/bin/xero +1 -9
- data/lib/xero_api.rb +4 -1
- data/lib/xero_cli/constants.rb +1 -1
- data/lib/xero_cli/options_parser.rb +0 -3
- data/lib/xero_cli/version.rb +1 -1
- metadata +9 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7637c960ba23b86ca3e889c91c057f0a31939c45293efca3a1682edfec9566d5
|
4
|
+
data.tar.gz: 7d95c1c8fd3ee6c81a12450e34e5617922e4601825646501b669561c5e191bac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b83e6dd789eb09151576ac12f1d4641b2cb5fe6b06347ef592761d7b30a5c4dbf42e2fdad47ebca5a52f37eaac61ac1ecd41fd578de9f66a1059ec903ddf545
|
7
|
+
data.tar.gz: e0b14545466efa035f8dad30cdc0d8af68ab41e050682ba906e4a3c62003e258e1cf31b68cf7299167d9e080bdf05312283295912f162e412257a4da13495942
|
data/README.MD
CHANGED
@@ -35,8 +35,8 @@ Options
|
|
35
35
|
|
36
36
|
|
37
37
|
# Building the GEM
|
38
|
-
gem install bundler
|
39
|
-
bundle install
|
40
|
-
rake build
|
41
|
-
rake install # Use locally
|
42
|
-
gem push pkg/... # Publish
|
38
|
+
gem install bundler
|
39
|
+
bundle install
|
40
|
+
rake build
|
41
|
+
rake install # Use locally
|
42
|
+
gem push pkg/... # Publish
|
data/Rakefile
CHANGED
data/bin/xero
CHANGED
@@ -1,12 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
ENV_FILE = '.env'.freeze
|
4
|
-
unless File.exist?(ENV_FILE)
|
5
|
-
File.open(ENV_FILE, 'w') { |file| file.write('XERO_CONNECTOR_URL=') }
|
6
|
-
end
|
7
|
-
|
8
|
-
require 'dotenv/load'
|
9
|
-
unless ARGV[0] == '-h' || ARGV[0] == '--help'
|
10
|
-
raise Exception, 'Please set XERO_CONNECTOR_URL in .env' if ENV['XERO_CONNECTOR_URL'].empty?
|
11
|
-
end
|
12
3
|
require 'xero_cli'
|
4
|
+
puts 'Xero CLI is ready to work'
|
data/lib/xero_api.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
require 'httparty'
|
2
2
|
|
3
3
|
class XeroAPI
|
4
|
+
|
5
|
+
XERO_CONNECTOR_URL = 'http://xero.accountdock.com'
|
6
|
+
|
4
7
|
def initialize(xero_guid)
|
5
8
|
@xero_guid = xero_guid
|
6
9
|
end
|
@@ -54,6 +57,6 @@ class XeroAPI
|
|
54
57
|
end
|
55
58
|
|
56
59
|
def request_url(path)
|
57
|
-
|
60
|
+
XERO_CONNECTOR_URL + path
|
58
61
|
end
|
59
62
|
end
|
data/lib/xero_cli/constants.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module XeroCLI
|
2
2
|
class Constants
|
3
|
-
XERO_CONNECTOR_ADDRESS =
|
3
|
+
XERO_CONNECTOR_ADDRESS = 'http://xero.accountdock.com/partner/tokens/new'.freeze
|
4
4
|
STRIPE_BANK_NAME = 'Stripe Merchant Account'.freeze
|
5
5
|
DEFAULT_CATEGORY_NAME = 'Sales'.freeze
|
6
6
|
end
|
@@ -23,9 +23,6 @@ module XeroCLI
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def separators
|
26
|
-
opt.separator 'Requires'
|
27
|
-
opt.separator ''
|
28
|
-
opt.separator ' XERO_CONNECTOR_URL must be set in .env // e.g. XERO_CONNECTOR_URL=http://google.com'
|
29
26
|
opt.separator ''
|
30
27
|
opt.separator 'Commands'
|
31
28
|
opt.separator ''
|
data/lib/xero_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xero-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xenon Ventures
|
@@ -14,30 +14,16 @@ dependencies:
|
|
14
14
|
name: awesome_print
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 1.8.0
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 1.8.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: dotenv
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
17
|
+
- - "~>"
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
19
|
+
version: '1.8'
|
34
20
|
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
|
-
- - "
|
24
|
+
- - "~>"
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
26
|
+
version: '1.8'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: httparty
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,28 +42,28 @@ dependencies:
|
|
56
42
|
name: rspec
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
|
-
- - "
|
45
|
+
- - "~>"
|
60
46
|
- !ruby/object:Gem::Version
|
61
47
|
version: '0'
|
62
48
|
type: :development
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
|
-
- - "
|
52
|
+
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: rake
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
|
-
- - "
|
59
|
+
- - "~>"
|
74
60
|
- !ruby/object:Gem::Version
|
75
61
|
version: '0'
|
76
62
|
type: :development
|
77
63
|
prerelease: false
|
78
64
|
version_requirements: !ruby/object:Gem::Requirement
|
79
65
|
requirements:
|
80
|
-
- - "
|
66
|
+
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: '0'
|
83
69
|
description: It's not time to make a change, just relax, take it easy. You're still
|