renuo-cli 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d499ae8ec9708a797078d0c6b04d2291113f58e4
4
+ data.tar.gz: f845531ef8552609aa150f32571fb72c90f04416
5
+ SHA512:
6
+ metadata.gz: d1acbfc27e530a4658117577cbf19710adbb41824929d4749931b8cbf9f775f0a532962864c9a993a8c5adad43d2833a78b608a74eba23fd0ec25a55600f542f
7
+ data.tar.gz: 06869b6ab734494e1b3e2c13329b6f73fdc91d6e7b32117d0ec8a4845e1a5b8a98780d711cc36b4c27345753b91aab433ce8b4bd144032a80c3076778e03abeb
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,21 @@
1
+ # EditorConfig helps developers define and maintain consistent
2
+ # coding styles between different editors and IDEs
3
+ # editorconfig.org
4
+
5
+ root = true
6
+
7
+ [*]
8
+
9
+ # Change these settings to your own preference
10
+ indent_style = space
11
+ indent_size = 2
12
+
13
+ # We recommend you to keep these unchanged
14
+ end_of_line = lf
15
+ charset = utf-8
16
+ trim_trailing_whitespace = true
17
+ insert_final_newline = true
18
+
19
+ [*.md]
20
+ trim_trailing_whitespace = false
21
+
@@ -0,0 +1,103 @@
1
+ ### JetBrains template
2
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
3
+
4
+ *.iml
5
+
6
+ ## Directory-based project format:
7
+ .idea/
8
+ # if you remove the above rule, at least ignore the following:
9
+
10
+ # User-specific stuff:
11
+ # .idea/workspace.xml
12
+ # .idea/tasks.xml
13
+ # .idea/dictionaries
14
+
15
+ # Sensitive or high-churn files:
16
+ # .idea/dataSources.ids
17
+ # .idea/dataSources.xml
18
+ # .idea/sqlDataSources.xml
19
+ # .idea/dynamic.xml
20
+ # .idea/uiDesigner.xml
21
+
22
+ # Gradle:
23
+ # .idea/gradle.xml
24
+ # .idea/libraries
25
+
26
+ # Mongo Explorer plugin:
27
+ # .idea/mongoSettings.xml
28
+
29
+ ## File-based project format:
30
+ *.ipr
31
+ *.iws
32
+
33
+ ## Plugin-specific files:
34
+
35
+ # IntelliJ
36
+ /out/
37
+
38
+ # mpeltonen/sbt-idea plugin
39
+ .idea_modules/
40
+
41
+ # JIRA plugin
42
+ atlassian-ide-plugin.xml
43
+
44
+ # Crashlytics plugin (for Android Studio and IntelliJ)
45
+ com_crashlytics_export_strings.xml
46
+ crashlytics.properties
47
+ crashlytics-build.properties
48
+ ### Vim template
49
+ [._]*.s[a-w][a-z]
50
+ [._]s[a-w][a-z]
51
+ *.un~
52
+ Session.vim
53
+ .netrwhist
54
+ *~
55
+ ### Ruby template
56
+ *.gem
57
+ *.rbc
58
+ /.config
59
+ /coverage/
60
+ /InstalledFiles
61
+ /pkg/
62
+ /spec/reports/
63
+ /spec/examples.txt
64
+ /test/tmp/
65
+ /test/version_tmp/
66
+ /tmp/
67
+
68
+ ## Specific to RubyMotion:
69
+ .dat*
70
+ .repl_history
71
+ build/
72
+
73
+ ## Documentation cache and generated files:
74
+ /.yardoc/
75
+ /_yardoc/
76
+ /doc/
77
+ /rdoc/
78
+
79
+ ## Environment normalisation:
80
+ /.bundle/
81
+ /vendor/bundle
82
+ /lib/bundler/man/
83
+
84
+ # for a library or gem, you might want to ignore these files since the code is
85
+ # intended to run in multiple environments; otherwise, check them in:
86
+ # Gemfile.lock
87
+ # .ruby-version
88
+ # .ruby-gemset
89
+
90
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
91
+ .rvmrc
92
+
93
+ # Created by .ignore support plugin (hsz.mobi)
94
+ .local_storage
95
+ /.bundle/
96
+ /.yardoc
97
+ /Gemfile.lock
98
+ /_yardoc/
99
+ /coverage/
100
+ /doc/
101
+ /pkg/
102
+ /spec/reports/
103
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,21 @@
1
+ AllCops:
2
+ RunRailsCops: false
3
+
4
+ Metrics/LineLength:
5
+ Max: 120
6
+
7
+ Style/Documentation:
8
+ Enabled: false
9
+
10
+ Style/NonNilCheck:
11
+ IncludeSemanticChanges: true
12
+
13
+ AllCops:
14
+ Include:
15
+ - '**/Rakefile'
16
+ - 'lib/**/*'
17
+ - 'spec/**/*'
18
+ - '*.gemspec'
19
+ Exclude:
20
+ - 'bin/**/*'
21
+
@@ -0,0 +1 @@
1
+ 2.2.3
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ cache: bundler
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.0.0
6
+ - 2.1
7
+ - 2.2
8
+ before_install: gem install bundler -v 1.10.6
9
+ install:
10
+ - bundle install --retry=3
11
+ script:
12
+ - bundle exec rspec
13
+ - bundle exec rubocop
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Lukas Elmer
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
13
+ all 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
21
+ THE SOFTWARE.
@@ -0,0 +1,49 @@
1
+ [![Build Status](https://travis-ci.org/renuo/renuo-cli.svg?branch=master)](https://travis-ci.org/renuo/renuo-cli)
2
+ [![Coverage Status](https://coveralls.io/repos/renuo/renuo-cli/badge.svg?branch=master&service=github)](https://coveralls.io/github/renuo/renuo-cli?branch=master)
3
+
4
+ # Renuo::Cli
5
+
6
+ The Renuo command line. Used for various (internal) stuff.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'renuo-cli'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install renuo-cli
23
+
24
+ ## Usage
25
+
26
+ ```
27
+ renuo -h
28
+ ```
29
+
30
+ ## Development
31
+
32
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
33
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
34
+
35
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the
36
+ version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version,
37
+ push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
38
+
39
+ ## Contributing
40
+
41
+ Bug reports and pull requests are welcome on GitHub at https://github.com/renuo/renuo-cli. This project is intended to
42
+ be a safe, welcoming space for collaboration, and contributors are expected to adhere to
43
+ the [Contributor Covenant](contributor-covenant.org) code of conduct.
44
+
45
+
46
+ ## License
47
+
48
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
49
+
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,15 @@
1
+ #!/bin/zsh
2
+
3
+ if ! command -v bundle > /dev/null; then
4
+ source ~/.zshrc
5
+ fi
6
+
7
+ bundle exec rubocop -D -c .rubocop.yml
8
+ RC=$?
9
+ if [ ! $RC -eq 0 ]; then
10
+ echo 'rubocop detected issues!'
11
+ bundle exec rubocop -a -D -c .rubocop.yml
12
+ echo 'Tried to auto correct the issues, but must be reviewed manually. Commit aborted!'
13
+ exit 1
14
+ fi
15
+
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'renuo/cli'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ require 'pry'
10
+ Pry.start
11
+
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require 'renuo/cli'
3
+ Renuo::CLI.start
@@ -0,0 +1,36 @@
1
+ require 'renuo/cli/version'
2
+ require 'rubygems'
3
+ require 'renuo/cli/app/name_display'
4
+ require 'renuo/cli/app/local_storage'
5
+
6
+ class Renuo::CLI
7
+ def self.start
8
+ require 'commander/import'
9
+ program :version, '0.0.1'
10
+ program :description, 'renuo CLI'
11
+
12
+ command 'display-name'.to_sym do |c|
13
+ c.syntax = 'renuo display-name [options]'
14
+ c.summary = 'displays the name of a customer'
15
+ c.description = ''
16
+ c.example 'description', 'command example'
17
+ c.option '--delete', 'Deletes the current name'
18
+ c.action do |args, _options|
19
+ NameDisplay.new.display_name(args)
20
+ end
21
+ end
22
+
23
+ command :config do |c|
24
+ c.syntax = 'renuo config [options]'
25
+ c.summary = ''
26
+ c.description = ''
27
+ c.example 'description', 'command example'
28
+ c.option '--some-switch', 'Some switch that does something'
29
+ c.action do |_args, _options|
30
+ key = ask('API Key?') { |q| q.echo = '*' }
31
+ LocalStorage.new.store(:api_key, key)
32
+ say('stored the api key')
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,30 @@
1
+ require 'json'
2
+
3
+ class LocalStorage
4
+ def store(key, value)
5
+ setup
6
+ config = load_config
7
+ config[key.to_s] = value
8
+ write_config(config)
9
+ end
10
+
11
+ def load(key)
12
+ config = load_config
13
+ config[key.to_s]
14
+ end
15
+
16
+ private
17
+
18
+ def load_config
19
+ JSON.parse(File.read('.local_storage'))
20
+ end
21
+
22
+ def write_config(config)
23
+ File.write('.local_storage', config.to_json)
24
+ File.chmod(0600, '.local_storage')
25
+ end
26
+
27
+ def setup
28
+ write_config({}) unless File.exist? '.local_storage'
29
+ end
30
+ end
@@ -0,0 +1,5 @@
1
+ class NameDisplay
2
+ def display_name(name)
3
+ puts "TODO: display #{name}"
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ module Renuo
2
+ module Cli
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,32 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'renuo/cli/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'renuo-cli'
8
+ spec.version = Renuo::Cli::VERSION
9
+ spec.authors = ['Lukas Elmer']
10
+ spec.email = ['lukas.elmer@gmail.com']
11
+
12
+ spec.summary = 'The Renuo CLI automates some commonly used workflows by providing a command line interface.'
13
+ spec.description = 'The Renuo CLI automates some commonly used workflows by providing a command line interface.'
14
+ spec.homepage = 'https://github.com/renuo/renuo-cli'
15
+ spec.license = 'MIT'
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = 'exe'
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ['lib']
21
+
22
+ spec.add_dependency 'commander'
23
+
24
+ spec.add_development_dependency 'bundler', '~> 1.10'
25
+ spec.add_development_dependency 'rake', '~> 10.0'
26
+ spec.add_development_dependency 'rspec'
27
+ spec.add_development_dependency 'cucumber'
28
+ spec.add_development_dependency 'aruba'
29
+ spec.add_development_dependency 'rubocop'
30
+ spec.add_development_dependency 'pry'
31
+ spec.add_development_dependency 'coveralls'
32
+ end
metadata ADDED
@@ -0,0 +1,195 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: renuo-cli
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Lukas Elmer
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-11-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: commander
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: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: cucumber
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: aruba
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: coveralls
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: The Renuo CLI automates some commonly used workflows by providing a command
140
+ line interface.
141
+ email:
142
+ - lukas.elmer@gmail.com
143
+ executables:
144
+ - renuo
145
+ extensions: []
146
+ extra_rdoc_files: []
147
+ files:
148
+ - ".coveralls.yml"
149
+ - ".editorconfig"
150
+ - ".gitignore"
151
+ - ".rspec"
152
+ - ".rubocop.yml"
153
+ - ".ruby-version"
154
+ - ".travis.yml"
155
+ - CODE_OF_CONDUCT.md
156
+ - Gemfile
157
+ - Gemfile.lock
158
+ - LICENSE.txt
159
+ - README.md
160
+ - Rakefile
161
+ - bin/check
162
+ - bin/console
163
+ - bin/setup
164
+ - exe/renuo
165
+ - lib/renuo/cli.rb
166
+ - lib/renuo/cli/app/local_storage.rb
167
+ - lib/renuo/cli/app/name_display.rb
168
+ - lib/renuo/cli/version.rb
169
+ - renuo-cli.gemspec
170
+ homepage: https://github.com/renuo/renuo-cli
171
+ licenses:
172
+ - MIT
173
+ metadata: {}
174
+ post_install_message:
175
+ rdoc_options: []
176
+ require_paths:
177
+ - lib
178
+ required_ruby_version: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
183
+ required_rubygems_version: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ requirements: []
189
+ rubyforge_project:
190
+ rubygems_version: 2.4.5.1
191
+ signing_key:
192
+ specification_version: 4
193
+ summary: The Renuo CLI automates some commonly used workflows by providing a command
194
+ line interface.
195
+ test_files: []