coltrane 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 512414fa0854b3ef1215953cbea3d5c545da0cef7978f098b4fbb945ea490ef0
4
- data.tar.gz: a9b854252e121e7f1a3a74b3c51b9470cdb8205f7f6328247a6b213e3e60f1c3
3
+ metadata.gz: f36865eb44c71e77285388f63b71fcc3e7a4920aed4b1ab77db7574e07839f07
4
+ data.tar.gz: 4a4088466a6747155d4506e1f166f464a8dfb7af3e5c6c04f6374e0bf456980f
5
5
  SHA512:
6
- metadata.gz: fa8eb9cc7e52398c4566717d86ff2291fc2793b1a5348c5f495acb7dc932ad1956f584791a5f0992e7e8cf5edb6bfc6f014fff9a20e34f69280319427dbcbf63
7
- data.tar.gz: '09eb103f1df2e6c7294b74c2f21e9690fa1a21d1ce8c6da5ea7b9407614c44643d093241f0b5d964849c32972b05db57ab59579f8b6549ff2243bdb4422646cf'
6
+ metadata.gz: d693c0f87aca2f0b1135ce2443f45c0e436d728d6cb98f196cc99d2c6c0e7552406df8f44f899ce92240b7c0f494e9b1b1fc318c975de20b8c748b02f7d447bd
7
+ data.tar.gz: f0930fb449dfd0d18410b1859dbc5ee531f489de1837ffc62a42882f74a4c9c100ec97f166b2979cfdddc90a3f6dcb7668420226670276b05c30d31413733db5
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  coverage
2
2
  cache
3
+ pkg
data/Gemfile CHANGED
@@ -2,14 +2,6 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gem 'facets', require: false
6
-
7
- group :cli do
8
- gem 'paint'
9
- gem 'chroma'
10
- gem 'mercenary'
11
- end
12
-
13
5
  group :test do
14
6
  gem 'rspec'
15
7
  gem 'pry'
@@ -2,6 +2,10 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  coltrane (1.0.0)
5
+ chroma (~> 0.2)
6
+ facets (~> 3.1)
7
+ mercenary (~> 0.3)
8
+ paint (~> 2.0)
5
9
 
6
10
  GEM
7
11
  remote: https://rubygems.org/
@@ -66,11 +70,7 @@ PLATFORMS
66
70
 
67
71
  DEPENDENCIES
68
72
  bundler (~> 1.14)
69
- chroma
70
73
  coltrane!
71
- facets
72
- mercenary
73
- paint
74
74
  pry
75
75
  pry-byebug
76
76
  pry-rescue
data/README.md CHANGED
@@ -2,10 +2,34 @@
2
2
 
3
3
  A musical abacus written in ruby.
4
4
 
5
- More info, story and purpose of the library:
6
- https://medium.com/@pedrozath/so-i-wrote-a-library-to-help-me-compose-music-ddb4ae7c8227
5
+ ![Coltrane](img/coltrane-logo.png)
7
6
 
8
- ## Installation
7
+ More info, story and purpose of the library [here](https://medium.com/@pedrozath/so-i-wrote-a-library-to-help-me-compose-music-ddb4ae7c8227).
8
+
9
+ ## CLI (Command Line Interface)
10
+
11
+ ```bash
12
+ $ gem install coltrane
13
+ ```
14
+
15
+ When you install the gem on your system, you automatically gain access to the
16
+ CLI.
17
+
18
+ It allows you to query for notes and chords and display them on your favorite instrument. No sheet music reading skills needed. It also allows you to find scales with a chord and find chords shared between two scales (that is actually the main goal when I did this project).
19
+
20
+ Some screenshot examples:
21
+ ![Screenshot](img/screen-3.png)
22
+ ![Screenshot](img/screen-2.png)
23
+ ![Screenshot](img/screen-9.png)
24
+ ![Screenshot](img/screen-8.png)
25
+ ![Screenshot](img/screen-10.png)
26
+ ![Screenshot](img/screen-1.png)
27
+ ![Screenshot](img/screen-4.png)
28
+ ![Screenshot](img/screen-5.png)
29
+ ![Screenshot](img/screen-6.png)
30
+
31
+
32
+ ## As a library
9
33
 
10
34
  Add this line to your application's Gemfile:
11
35
 
@@ -14,35 +38,35 @@ gem 'coltrane'
14
38
  ```
15
39
 
16
40
  And then execute:
41
+ ```sh
42
+ $ bundle
43
+ ```
17
44
 
18
- $ bundle
19
-
20
- Or install it yourself as:
21
-
22
- $ gem install coltrane
23
-
24
- ## CLI (Command Line Interface)
45
+ The whole library will be available under the `Coltrane` module. The CLI code won't be imported to your application as default. Here's a quick example on how to use it:
25
46
 
26
- When you install the gem on your system, you automatically gain access to the
27
- CLI.
47
+ ```ruby
48
+ require 'coltrane'
28
49
 
29
- You can run it on terminal:
50
+ puts Coltrane::Scale.major('C').sevenths.map(&:name)
51
+ # => ["CM7", "Dm7", "Em7", "FM7", "G7", "Am7", "Bm7b5"]
30
52
 
31
- ```bash
32
- $ coltrane help
53
+ puts Coltrane::Scale.having_chord('Cmaj7').scales.map(&:name)
54
+ # => ["C Major", "G Major", "E Natural Minor", "A Natural Minor", "E Harmonic Minor", "B Flamenco"]
33
55
  ```
34
56
 
35
57
  ## Roadmap
36
58
 
37
59
  There's a lot of things that need to be done on this library, specially on the CLI:
38
60
 
39
- + Refactor the CLI into a more succinct and elegantly organized architecture
40
- + Amplify the test coverage
41
- + Move Scale#chords method to NoteSet
42
- + Write tests for the caching
43
- + Write up a caching cleaning command
44
- + Include CLI commands to output chord progressions
45
- + Include a command to output a pretty HTML document containing the query
61
+ - [ ] Separate into 2 gems: `coltrane` and `coltrane-cli`
62
+ - [ ] Make all output more colorful
63
+ - [ ] Refactor the CLI into a more succinct and elegantly organized architecture
64
+ - [ ] Amplify the test coverage
65
+ - [ ] Move Scale#chords method to NoteSet
66
+ - [ ] Write tests for the caching
67
+ - [ ] Write up a caching cleaning command
68
+ - [ ] Include CLI commands to output chord progressions
69
+ - [ ] Include a command to output a pretty HTML document containing the query
46
70
 
47
71
  ## Contributing
48
72
 
@@ -30,6 +30,10 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ["lib"]
32
32
 
33
- spec.add_development_dependency "bundler", "~> 1.14"
34
- spec.add_development_dependency "rake", "~> 10.0"
33
+ spec.add_runtime_dependency 'facets', '~> 3.1'
34
+ spec.add_runtime_dependency 'paint', '~> 2.0'
35
+ spec.add_runtime_dependency 'chroma', '~> 0.2.0'
36
+ spec.add_runtime_dependency 'mercenary', '~> 0.3'
37
+ spec.add_development_dependency "bundler", '~> 1.14'
38
+ spec.add_development_dependency "rake", '~> 10.0'
35
39
  end
@@ -1,10 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'bundler'
4
- require 'pry'
5
-
6
- Bundler.require(:cli)
7
-
8
3
  $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
9
4
 
10
5
  require 'core_ext'
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,3 +1,3 @@
1
1
  module Coltrane
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coltrane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Maciel
@@ -10,6 +10,62 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2018-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: facets
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: paint
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: chroma
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.2.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.2.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: mercenary
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.3'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.3'
13
69
  - !ruby/object:Gem::Dependency
14
70
  name: bundler
15
71
  requirement: !ruby/object:Gem::Requirement
@@ -92,6 +148,17 @@ files:
92
148
  - db/config.yml
93
149
  - db/schema.rb
94
150
  - exe/coltrane
151
+ - img/coltrane-logo.png
152
+ - img/screen-1.png
153
+ - img/screen-10.png
154
+ - img/screen-2.png
155
+ - img/screen-3.png
156
+ - img/screen-4.png
157
+ - img/screen-5.png
158
+ - img/screen-6.png
159
+ - img/screen-7.png
160
+ - img/screen-8.png
161
+ - img/screen-9.png
95
162
  - lib/cli/bass_guitar.rb
96
163
  - lib/cli/chord.rb
97
164
  - lib/cli/errors.rb