frecli 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +84 -0
- data/bin/frecli +134 -0
- data/frecli.rdoc +5 -0
- data/lib/frecli.rb +9 -0
- data/lib/frecli/queries.rb +43 -0
- data/lib/frecli/settings.rb +66 -0
- data/lib/frecli/table.rb +61 -0
- data/lib/frecli/version.rb +3 -0
- data/spec/frecli/frecli_spec.rb +3 -0
- data/spec/frecli/settings_spec.rb +54 -0
- data/spec/spec_helper.rb +82 -0
- metadata +201 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fa2a056d45476409699fa4a851d0cf52f70484bb
|
4
|
+
data.tar.gz: 4322731614f81187010f2a5fe85c819278c2f3cf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b954dcfcbee6b3f9f7c82f1f57230c974ca594cf889a30c6b058416ddce7c5d0b9bc2baf8c9a4d41a9460e7603d60c88291f827a1b6a543b26cd6f3451afe805
|
7
|
+
data.tar.gz: 25822400a7b82abef2cb660251d68af0f53af1c4f73afd6d797b9383dd2f7c4397195bdd9c5b268c160d1969e6773b452be19387b8ec2b7d4722050283da5e86
|
data/README.md
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# FreCLI
|
2
|
+
Freckle CLI client in Ruby.
|
3
|
+
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/frecli.svg)](https://badge.fury.io/rb/frecli)
|
5
|
+
[![Dependency Status](https://gemnasium.com/shkm/frecli.svg)](https://gemnasium.com/shkm/frecli)
|
6
|
+
[![Build Status](https://travis-ci.org/shkm/frecli.svg)](https://travis-ci.org/shkm/frecli)
|
7
|
+
[![Code Climate](https://codeclimate.com/github/shkm/frecli/badges/gpa.svg)](https://codeclimate.com/github/shkm/frecli)
|
8
|
+
[![Test Coverage](https://codeclimate.com/github/shkm/frecli/badges/coverage.svg)](https://codeclimate.com/github/shkm/frecli/coverage)
|
9
|
+
|
10
|
+
## What it does right now
|
11
|
+
|
12
|
+
This is still very basic and in development, but some functionality works. I'm working on both this and the API client behind it ([freckle-api](https://github.com/shkm/freckle-api)) consecutively.
|
13
|
+
|
14
|
+
|
15
|
+
### Projects
|
16
|
+
|
17
|
+
- `projects` lists all projects available to you
|
18
|
+
- `project ID` list the given project's attributes by its ID.
|
19
|
+
|
20
|
+
## Configuration
|
21
|
+
|
22
|
+
There are a couple of ways to configure FreCLI.
|
23
|
+
|
24
|
+
### Global
|
25
|
+
|
26
|
+
A 'global' configuration can be achieved through a `~/.frecli` file or directory. If `~/.frecli` is a file, FreCLI will parse it as YAML. If it's a directory, it will parse and merge settings for all files within.
|
27
|
+
|
28
|
+
### Cascading
|
29
|
+
|
30
|
+
frecli configuration always cascades down to the current directory. This means that if you have the following directory structure:
|
31
|
+
|
32
|
+
```bash
|
33
|
+
$HOME/
|
34
|
+
|-- .frecli # setting_one: foo, api_key: qwerty1234
|
35
|
+
|-- repos/
|
36
|
+
|-- .frecli/
|
37
|
+
|-- settings.yml # setting_one: bar
|
38
|
+
|-- more_settings.yml # setting_two: 2 , api_key: asdf5678
|
39
|
+
|-- project/
|
40
|
+
|-- .frecli # project_setting: my_project
|
41
|
+
|
42
|
+
```
|
43
|
+
|
44
|
+
and you run FreCLI from `~/repos/project`, your settings will be as follows:
|
45
|
+
|
46
|
+
```yml
|
47
|
+
setting_one: bar
|
48
|
+
setting_two: 2
|
49
|
+
api_key: asdf5678
|
50
|
+
project_setting: my_project
|
51
|
+
```
|
52
|
+
|
53
|
+
This will become rather powerful. For example, if you're working on the same project as a team, settings relevant to the project can be added to the project's repository, and everyone in the team will benefit. Such a setting may be the project's ID (though this is not currently implemented), allowing anyone on the team to clock their time on the relevant project when running FreCLI from that project's directory.
|
54
|
+
|
55
|
+
### Settings
|
56
|
+
|
57
|
+
The following are available as settings.
|
58
|
+
|
59
|
+
|
60
|
+
#### `api_key` *required*
|
61
|
+
Your Freckle API key. You can get this from the [Freckle site](https://letsfreckle.com) under 'Integrations & apps' -> 'Freckle API'. Just click on 'Settings' next to 'Personal Access Tokens' and create a token for FreCLI.
|
62
|
+
|
63
|
+
If you commit your FreCLI settings — with your dotfiles, for example — you can use a more secure approach:
|
64
|
+
|
65
|
+
1. Set it as an environment variable: `export FRECKLE_API_KEY="YOURKEY"` in a file which is in your repo's ignore list.
|
66
|
+
2. Set it in a YAML file such as `~/.frecli/secrets.yml'`and add it to your repo's ignore list.
|
67
|
+
|
68
|
+
Note that for security, you can also set this as an environment variable, which is recommended. Simply add the following to your environment:
|
69
|
+
|
70
|
+
```
|
71
|
+
export FRECKLE_API_KEY="YOURKEY"
|
72
|
+
```
|
73
|
+
|
74
|
+
I prefer to put sensitive env variables in `~/.secrets`, with the following in my ~/.profile:
|
75
|
+
```
|
76
|
+
if [ -f "$HOME/.secrets" ]; then
|
77
|
+
source $HOME/.secrets
|
78
|
+
fi
|
79
|
+
|
80
|
+
```
|
81
|
+
|
82
|
+
## Thanks
|
83
|
+
- My work, [Lico Innovations](http://lico.nl/) for using Freckle :-)
|
84
|
+
- The awesome Freckle developers — Thomas Cannon in particular — who shared interest in this project and even gave me a free account for testing!
|
data/bin/frecli
ADDED
@@ -0,0 +1,134 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'gli'
|
4
|
+
require 'frecli/table'
|
5
|
+
require 'frecli'
|
6
|
+
|
7
|
+
include GLI::App
|
8
|
+
include Frecli::Settings
|
9
|
+
|
10
|
+
program_desc 'Freckle CLI'
|
11
|
+
|
12
|
+
version Frecli::VERSION
|
13
|
+
|
14
|
+
subcommand_option_handling :normal
|
15
|
+
arguments :strict
|
16
|
+
|
17
|
+
desc 'Manage projects'
|
18
|
+
command [:project, :projects, :p] do |c|
|
19
|
+
c.desc 'List all projects'
|
20
|
+
c.command [:all, :a] do |all|
|
21
|
+
all.action do
|
22
|
+
puts Frecli::Table.vertical(
|
23
|
+
Frecli.projects,
|
24
|
+
[ 'ID', 'Name', 'Date created', 'Date updated' ],
|
25
|
+
[ :id, :name, :created_at, :updated_at ]
|
26
|
+
)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
c.desc 'Show a project'
|
31
|
+
c.arg :id, :required
|
32
|
+
c.command [:show, :s] do |show|
|
33
|
+
show.action do |_, _, args|
|
34
|
+
id = args[0]
|
35
|
+
|
36
|
+
puts Frecli::Table.horizontal(
|
37
|
+
Frecli.project(id),
|
38
|
+
{ ID: :id,
|
39
|
+
Name: :name,
|
40
|
+
Minutes: :minutes }
|
41
|
+
)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
c.desc 'Show the currently timed project'
|
46
|
+
c.command [:current, :c] do |current|
|
47
|
+
current.action do
|
48
|
+
|
49
|
+
# TODO: DRY
|
50
|
+
puts Frecli::Table.horizontal(
|
51
|
+
Frecli.project_current,
|
52
|
+
{ ID: :id,
|
53
|
+
Name: :name,
|
54
|
+
Minutes: :minutes }
|
55
|
+
)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
c.default_command :current
|
60
|
+
end
|
61
|
+
|
62
|
+
desc 'Manage timers'
|
63
|
+
command [:timer, :timers, :t] do |c|
|
64
|
+
c.desc 'List all timers'
|
65
|
+
c.command [:all, :a] do |all|
|
66
|
+
all.action do
|
67
|
+
puts Frecli::Table.vertical(
|
68
|
+
Frecli.timers,
|
69
|
+
[ 'Project ID', 'State', 'Time', 'Date' ],
|
70
|
+
[ -> (timer) { timer.project.id }, :state, :formatted_time, :date ]
|
71
|
+
)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
c.desc 'Show a timer'
|
76
|
+
c.arg :id, :required
|
77
|
+
c.command [:show, :s] do |show|
|
78
|
+
show.action do |_, _, args|
|
79
|
+
project_id = args[0]
|
80
|
+
|
81
|
+
|
82
|
+
# TODO: DRY
|
83
|
+
puts Frecli::Table.horizontal(
|
84
|
+
Frecli.timer(project_id),
|
85
|
+
{ ID: :id,
|
86
|
+
State: :state,
|
87
|
+
Time: :formatted_time,
|
88
|
+
Description: :description }
|
89
|
+
)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
c.desc 'Show the current timer'
|
94
|
+
c.command [:current, :c] do |current|
|
95
|
+
current.action do
|
96
|
+
|
97
|
+
# TODO: DRY
|
98
|
+
puts Frecli::Table.horizontal(
|
99
|
+
Frecli.timer_current,
|
100
|
+
{ ID: :id,
|
101
|
+
State: :state,
|
102
|
+
Time: :formatted_time,
|
103
|
+
Description: :description }
|
104
|
+
)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
c.default_command :current
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
pre do |global,command,options,args|
|
114
|
+
# Pre logic here
|
115
|
+
# Return true to proceed; false to abort and not call the
|
116
|
+
# chosen command
|
117
|
+
# Use skips_pre before a command to skip this block
|
118
|
+
# on that command only
|
119
|
+
true
|
120
|
+
end
|
121
|
+
|
122
|
+
post do |global,command,options,args|
|
123
|
+
# Post logic here
|
124
|
+
# Use skips_post before a command to skip this
|
125
|
+
# block on that command only
|
126
|
+
end
|
127
|
+
|
128
|
+
on_error do |exception|
|
129
|
+
# Error logic here
|
130
|
+
# return false to skip default error handling
|
131
|
+
true
|
132
|
+
end
|
133
|
+
|
134
|
+
exit run(ARGV)
|
data/frecli.rdoc
ADDED
data/lib/frecli.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
class Frecli
|
2
|
+
module Queries
|
3
|
+
def self.included(base)
|
4
|
+
base.extend(ClassMethods)
|
5
|
+
end
|
6
|
+
|
7
|
+
module ClassMethods
|
8
|
+
def api
|
9
|
+
@api = FreckleApi.new(Settings[:api_key])
|
10
|
+
end
|
11
|
+
|
12
|
+
# The project which is currently being timed.
|
13
|
+
def project_current
|
14
|
+
project_id = timer_current.project.id
|
15
|
+
|
16
|
+
# TODO: use a reload method instead.
|
17
|
+
sleep 0.5
|
18
|
+
project(project_id)
|
19
|
+
end
|
20
|
+
|
21
|
+
def projects
|
22
|
+
api.projects
|
23
|
+
end
|
24
|
+
|
25
|
+
def project(id)
|
26
|
+
api.project(id)
|
27
|
+
end
|
28
|
+
|
29
|
+
def timer_current
|
30
|
+
timers.detect { |timer| timer.state == :running }
|
31
|
+
end
|
32
|
+
|
33
|
+
def timers
|
34
|
+
api.timers
|
35
|
+
end
|
36
|
+
|
37
|
+
def timer(project_id)
|
38
|
+
api.timer(project_id)
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
class Frecli
|
4
|
+
module Settings
|
5
|
+
def self.settings(root_path: '/', reload: false)
|
6
|
+
if reload || !@settings
|
7
|
+
return (@settings = compile_settings(root_path: root_path))
|
8
|
+
end
|
9
|
+
|
10
|
+
@settings
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.[](key)
|
14
|
+
settings[key]
|
15
|
+
end
|
16
|
+
|
17
|
+
# Merges .frecli files down from root dir.
|
18
|
+
# If .frecli is a dir, it will merge all files within.
|
19
|
+
# Relevant ENV vars will always take precedence.
|
20
|
+
def self.compile_settings(root_path: '/')
|
21
|
+
{}.tap do |settings|
|
22
|
+
setting_filenames(root_path: root_path).each do |name|
|
23
|
+
settings.merge!(
|
24
|
+
Hash[YAML.load(File.open name).map { |(k, v)| [k.to_sym, v] }])
|
25
|
+
end
|
26
|
+
|
27
|
+
settings[:api_key] = ENV['FRECKLE_API_KEY'] if ENV.include?('FRECKLE_API_KEY')
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.setting_filenames(root_path: '/')
|
32
|
+
setting_paths(root_path: root_path).map do |path|
|
33
|
+
filename = join_paths(path, '.frecli')
|
34
|
+
|
35
|
+
next unless File.exist?(filename)
|
36
|
+
|
37
|
+
if File.directory?(filename)
|
38
|
+
Dir.glob(join_paths(filename, '*'))
|
39
|
+
else
|
40
|
+
filename
|
41
|
+
end
|
42
|
+
end.flatten.compact
|
43
|
+
end
|
44
|
+
|
45
|
+
# Return all the paths from root_path to the current dir.
|
46
|
+
#
|
47
|
+
# e.g.
|
48
|
+
# ['/', '/Users', '/Users/isaac', '/Users/isaac/project']
|
49
|
+
def self.setting_paths(root_path: '/')
|
50
|
+
Dir
|
51
|
+
.getwd
|
52
|
+
.sub(root_path, '/')
|
53
|
+
.split('/')
|
54
|
+
.reject(&:empty?)
|
55
|
+
.inject([root_path]) do |path, wd|
|
56
|
+
path << join_paths(path.last, wd)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.join_paths(*paths)
|
61
|
+
separator = [*paths].first == '/' ? '' : '/'
|
62
|
+
|
63
|
+
[*paths].join(separator)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
data/lib/frecli/table.rb
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'terminal-table'
|
2
|
+
|
3
|
+
class Frecli
|
4
|
+
module Table
|
5
|
+
# Table where heading is in the first row,
|
6
|
+
# and values are in the columns
|
7
|
+
#
|
8
|
+
# When records = [ { id: 1, name: 'Hello', body: 'Hello, world!' } ]
|
9
|
+
# headings = 'ID', 'Name', 'Body']
|
10
|
+
# values = [ :id, :name, :body]
|
11
|
+
# +----------------------------+
|
12
|
+
# | ID | Name | Body |
|
13
|
+
# +----------------------------+
|
14
|
+
# | 1 | Hello | Hello, world! |
|
15
|
+
# +----------------------------+
|
16
|
+
def self.vertical(records, headings, values)
|
17
|
+
Terminal::Table.new do |table|
|
18
|
+
|
19
|
+
table.headings = headings
|
20
|
+
table.rows = records.map do |record|
|
21
|
+
values.map { |value| table_item(record, value)}
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
# Table where heading is in the first column,
|
27
|
+
# and value in the second.
|
28
|
+
#
|
29
|
+
# When records = [ { id: 1, name: 'Hello', body: 'Hello, world!' } ]
|
30
|
+
# items = [ { ID: :id, Name: :name, Body: :body } ]
|
31
|
+
# +----------------------+
|
32
|
+
# | ID | 1 |
|
33
|
+
# | Name | Hello |
|
34
|
+
# | Body | Hello, world! |
|
35
|
+
# +----------------------+
|
36
|
+
def self.horizontal(record, items)
|
37
|
+
Terminal::Table.new do |table|
|
38
|
+
table.rows = items.map do |name, value|
|
39
|
+
[name, table_item(record, value)]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# When record = { id: 1, name: 'Hello', body: 'Hello, world!' }
|
45
|
+
#
|
46
|
+
# value = :id
|
47
|
+
# => 1
|
48
|
+
#
|
49
|
+
# value = -> (record) { record.name.upcase }
|
50
|
+
# => 'HELLO'
|
51
|
+
#
|
52
|
+
# value = 'foo'
|
53
|
+
# => 'foo'
|
54
|
+
def self.table_item(record, value)
|
55
|
+
return record[value] if value.is_a? Symbol
|
56
|
+
return value[record] if value.respond_to? :call
|
57
|
+
|
58
|
+
value
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
RSpec.describe Frecli::Settings do
|
2
|
+
describe '#settings' do
|
3
|
+
ROOT_PATH = "#{Dir.getwd}/spec/fixtures/settings"
|
4
|
+
|
5
|
+
around(:each) do |spec|
|
6
|
+
dir = [
|
7
|
+
ROOT_PATH,
|
8
|
+
'Users',
|
9
|
+
'isaac',
|
10
|
+
fixture
|
11
|
+
].join('/')
|
12
|
+
|
13
|
+
Dir.chdir(dir, &spec)
|
14
|
+
end
|
15
|
+
|
16
|
+
let(:settings) { Frecli::Settings.settings(root_path: ROOT_PATH, reload: true) }
|
17
|
+
|
18
|
+
context "when a .frecli file exists only in user's home" do
|
19
|
+
let(:fixture) { 'project_without_settings' }
|
20
|
+
|
21
|
+
it "stores the file's settings" do
|
22
|
+
expect(settings).to eq(api_key: 'the_api_key')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'when a .frecli directory exists' do
|
27
|
+
let(:fixture) { 'project_with_frecli_folder' }
|
28
|
+
|
29
|
+
it 'includes settings from all files in the folder' do
|
30
|
+
expect(settings).to eq(
|
31
|
+
api_key: 'the_api_key', # from home
|
32
|
+
setting_one: 1,
|
33
|
+
setting_two: 2
|
34
|
+
)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context 'when .frecli files exist in both home and current dir' do
|
39
|
+
let(:fixture) { 'project_with_settings' }
|
40
|
+
|
41
|
+
it "stores both files' settings" do
|
42
|
+
expect(settings).to eq(api_key: 'the_api_key', foo: 'bar')
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context 'when multiple .frecli files exist' do
|
47
|
+
let(:fixture) { 'project_with_override' }
|
48
|
+
|
49
|
+
it 'overrides a previously set setting with the more specific one.' do
|
50
|
+
expect(settings).to eq(api_key: 'overridden_api_key')
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'codeclimate-test-reporter'
|
2
|
+
CodeClimate::TestReporter.start
|
3
|
+
|
4
|
+
require 'rspec'
|
5
|
+
require 'pry'
|
6
|
+
require 'pry-byebug'
|
7
|
+
require 'aruba/rspec'
|
8
|
+
|
9
|
+
require 'frecli'
|
10
|
+
|
11
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
12
|
+
Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require_relative f }
|
13
|
+
|
14
|
+
RSpec.configure do |config|
|
15
|
+
config.expect_with :rspec do |expectations|
|
16
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
17
|
+
# and `failure_message` of custom matchers include text for helper methods
|
18
|
+
# defined using `chain`, e.g.:
|
19
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
20
|
+
# # => "be bigger than 2 and smaller than 4"
|
21
|
+
# ...rather than:
|
22
|
+
# # => "be bigger than 2"
|
23
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
24
|
+
end
|
25
|
+
|
26
|
+
config.mock_with :rspec do |mocks|
|
27
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
28
|
+
# a real object. This is generally recommended, and will default to
|
29
|
+
# `true` in RSpec 4.
|
30
|
+
mocks.verify_partial_doubles = true
|
31
|
+
end
|
32
|
+
|
33
|
+
# These two settings work together to allow you to limit a spec run
|
34
|
+
# to individual examples or groups you care about by tagging them with
|
35
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
36
|
+
# get run.
|
37
|
+
config.filter_run :focus
|
38
|
+
config.run_all_when_everything_filtered = true
|
39
|
+
|
40
|
+
# Allows RSpec to persist some state between runs in order to support
|
41
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
42
|
+
# you configure your source control system to ignore this file.
|
43
|
+
# config.example_status_persistence_file_path = 'spec/examples.txt'
|
44
|
+
|
45
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
46
|
+
# recommended. For more details, see:
|
47
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
48
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
49
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
50
|
+
config.disable_monkey_patching!
|
51
|
+
|
52
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
53
|
+
# be too noisy due to issues in dependencies.
|
54
|
+
config.warnings = false
|
55
|
+
|
56
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
57
|
+
# file, and it's useful to allow more verbose output when running an
|
58
|
+
# individual spec file.
|
59
|
+
if config.files_to_run.one?
|
60
|
+
# Use the documentation formatter for detailed output,
|
61
|
+
# unless a formatter has already been configured
|
62
|
+
# (e.g. via a command-line flag).
|
63
|
+
config.default_formatter = 'doc'
|
64
|
+
end
|
65
|
+
|
66
|
+
# Print the 10 slowest examples and example groups at the
|
67
|
+
# end of the spec run, to help surface which specs are running
|
68
|
+
# particularly slow.
|
69
|
+
config.profile_examples = 10
|
70
|
+
|
71
|
+
# Run specs in random order to surface order dependencies. If you find an
|
72
|
+
# order dependency and want to debug it, you can fix the order by providing
|
73
|
+
# the seed, which is printed after each run.
|
74
|
+
# --seed 1234
|
75
|
+
config.order = :random
|
76
|
+
|
77
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
78
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
79
|
+
# test failures related to randomization by passing the same `--seed` value
|
80
|
+
# as the one that triggered the failure.
|
81
|
+
Kernel.srand config.seed
|
82
|
+
end
|
metadata
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: frecli
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jamie Schembri
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-01-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '10.1'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '10.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rdoc
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '4.2'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '4.2'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: aruba
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.11'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.11'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: webmock
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.22'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.22'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.4'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.4'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry-byebug
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.3'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: codeclimate-test-reporter
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.4'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.4'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: gli
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.13'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.13'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: terminal-table
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.5'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.5'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: freckle-api
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.1.4
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.1.4
|
153
|
+
description:
|
154
|
+
email: jamie@schembri.me
|
155
|
+
executables:
|
156
|
+
- frecli
|
157
|
+
extensions: []
|
158
|
+
extra_rdoc_files:
|
159
|
+
- frecli.rdoc
|
160
|
+
files:
|
161
|
+
- README.md
|
162
|
+
- bin/frecli
|
163
|
+
- frecli.rdoc
|
164
|
+
- lib/frecli.rb
|
165
|
+
- lib/frecli/queries.rb
|
166
|
+
- lib/frecli/settings.rb
|
167
|
+
- lib/frecli/table.rb
|
168
|
+
- lib/frecli/version.rb
|
169
|
+
- spec/frecli/frecli_spec.rb
|
170
|
+
- spec/frecli/settings_spec.rb
|
171
|
+
- spec/spec_helper.rb
|
172
|
+
homepage: http://github.com/shkm/frecli
|
173
|
+
licenses:
|
174
|
+
- MIT
|
175
|
+
metadata: {}
|
176
|
+
post_install_message:
|
177
|
+
rdoc_options:
|
178
|
+
- "--title"
|
179
|
+
- frecli
|
180
|
+
require_paths:
|
181
|
+
- lib
|
182
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
requirements: []
|
193
|
+
rubyforge_project:
|
194
|
+
rubygems_version: 2.5.1
|
195
|
+
signing_key:
|
196
|
+
specification_version: 4
|
197
|
+
summary: Command line client for Freckle.
|
198
|
+
test_files:
|
199
|
+
- spec/frecli/frecli_spec.rb
|
200
|
+
- spec/frecli/settings_spec.rb
|
201
|
+
- spec/spec_helper.rb
|