everything-core 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5a17687cc66c5c0c99821b775eee107ab0425b27
4
- data.tar.gz: 56dc019b950f486d68f68ddbf38f7e8f4218e495
3
+ metadata.gz: d6930e135f667b27803ee6f3880cf9065930dcc0
4
+ data.tar.gz: 034652cb0f67c43b269b6c0f7a1ad95bf1de2c2a
5
5
  SHA512:
6
- metadata.gz: 8681ba9e53c5bce59cb520bcb943dfd8a688d4f9cb3d3e8198ac22fd2f5aef7cc69746fd0993fc234f2f63ab97099f61bb57b082b4ed353efee6350aec0ab172
7
- data.tar.gz: ffab10e88a2fcf7d2de8a680ebbc360b2acb67a8b8d19046b55bc5109f8eded6ca754fb4219da86ebed4d10059e0f69554db2f470b1a8cd95a817270d27b6836
6
+ metadata.gz: 03971f08b4f32d3fd7c5d3dc34d0b262024ea8bdd07b7cf0e1f7b81ddea4d08d9c6e34b777d668fd4d095e6ccdc09b156f0bebed3509b8cb89c37b557cf806c7
7
+ data.tar.gz: cccbd47e5994d8f396893021845d88a55f0751bdc3fe15da507095e1dc8f7be85fe21c80117be42d4499b11690368dd69def8df43e74a4fa6395ef5433bec6f8
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  *.gem
2
2
  .env
3
+ Gemfile.lock
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ ## 0.0.3
4
+
5
+ - Change `Everything` from a class to a module
6
+ - Add basic rspec coverage
7
+
8
+ ## 0.0.2
9
+
10
+ - Add dotenv support
11
+
12
+ ## 0.0.1
13
+
14
+ - Initial release
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in fastenv.gemspec
3
+ # The gem's dependencies are specified in `everything-core.gemspec`.
4
4
  gemspec
5
5
 
@@ -4,25 +4,25 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'everything/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "everything-core"
7
+ spec.name = 'everything-core'
8
8
  spec.version = Everything::VERSION
9
- spec.authors = ["Kyle Tolle"]
10
- spec.email = ["kyle@nullsix.com"]
9
+ spec.authors = ['Kyle Tolle']
10
+ spec.email = ['kyle@nullsix.com']
11
11
  spec.summary = %q{Library for working with your `everything` repository.}
12
12
  spec.description = %q{Gives you access to pieces within your everything repo.}
13
- spec.homepage = "https://github.com/kyletolle/everything-core"
14
- spec.license = "MIT"
13
+ spec.homepage = 'https://github.com/kyletolle/everything-core'
14
+ spec.license = 'MIT'
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
19
+ spec.require_paths = ['lib']
20
20
 
21
- spec.add_runtime_dependency "fastenv", "= 0.0.2"
22
- spec.add_runtime_dependency "dotenv", "= 2.0.2"
21
+ spec.add_runtime_dependency 'dotenv', '= 2.0.2'
22
+ spec.add_runtime_dependency 'fastenv', '= 0.0.2'
23
23
 
24
- spec.add_development_dependency "bundler", "~> 1.11"
25
- spec.add_development_dependency "rake", "~> 10.4"
26
- spec.add_development_dependency "rspec"
24
+ spec.add_development_dependency 'bundler', '~> 1.11'
25
+ spec.add_development_dependency 'rake', '~> 10.5'
26
+ spec.add_development_dependency 'rspec', '~> 3.4'
27
27
  end
28
28
 
@@ -1,4 +1,4 @@
1
- class Everything
1
+ module Everything
2
2
  class Piece
3
3
  def initialize(full_path)
4
4
  @full_path = full_path
@@ -1,3 +1,3 @@
1
- class Everything
2
- VERSION = "0.0.2"
1
+ module Everything
2
+ VERSION = '0.0.3'
3
3
  end
data/lib/everything.rb CHANGED
@@ -5,7 +5,7 @@ require 'fastenv'
5
5
  require 'everything/version'
6
6
  require 'everything/piece'
7
7
 
8
- class Everything
8
+ module Everything
9
9
  def self.path
10
10
  Fastenv.everything_path
11
11
  end
@@ -0,0 +1,63 @@
1
+ require './lib/everything/piece'
2
+
3
+ describe Everything::Piece do
4
+ let(:given_full_path) do
5
+ 'some/fake/path/here'
6
+ end
7
+ let(:piece) do
8
+ described_class.new(given_full_path)
9
+ end
10
+ let(:expected_markdown_file_path) do
11
+ "#{given_full_path}/index.md"
12
+ end
13
+ let(:fake_markdown_text) do
14
+ <<MD
15
+ # Piece Title Here
16
+
17
+ The content is totally this right here.
18
+
19
+ And it might even include multiple lines!
20
+ MD
21
+ end
22
+
23
+ before do
24
+ expect(File)
25
+ .to receive(:read)
26
+ .with(expected_markdown_file_path)
27
+ .and_return(fake_markdown_text)
28
+ end
29
+
30
+ describe '#raw_markdown' do
31
+ let(:expected_raw_markdown) do
32
+ fake_markdown_text
33
+ end
34
+
35
+ it "is all the file's markdown" do
36
+ expect(piece.raw_markdown).to eq(expected_raw_markdown)
37
+ end
38
+ end
39
+
40
+ describe '#title' do
41
+ let(:expected_title) do
42
+ 'Piece Title Here'
43
+ end
44
+
45
+ it 'is text of the markdown title' do
46
+ expect(piece.title).to eq(expected_title)
47
+ end
48
+ end
49
+
50
+ describe '#content' do
51
+ let(:expected_content) do
52
+ <<TEXT
53
+ The content is totally this right here.
54
+
55
+ And it might even include multiple lines!
56
+ TEXT
57
+ end
58
+
59
+ it 'is only the markdown after the title' do
60
+ expect(piece.content).to eq(expected_content)
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,17 @@
1
+ require './lib/everything'
2
+
3
+ describe Everything do
4
+ describe '.path' do
5
+ let(:expected_path) do
6
+ '/some/path/to/your/everything/repo/'
7
+ end
8
+
9
+ before do
10
+ ENV['EVERYTHING_PATH'] = expected_path
11
+ end
12
+
13
+ it 'is the path from the environment' do
14
+ expect(described_class.path).to eq(expected_path)
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,96 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ RSpec.configure do |config|
20
+ # rspec-expectations config goes here. You can use an alternate
21
+ # assertion/expectation library such as wrong or the stdlib/minitest
22
+ # assertions if you prefer.
23
+ config.expect_with :rspec do |expectations|
24
+ # This option will default to `true` in RSpec 4. It makes the `description`
25
+ # and `failure_message` of custom matchers include text for helper methods
26
+ # defined using `chain`, e.g.:
27
+ # be_bigger_than(2).and_smaller_than(4).description
28
+ # # => "be bigger than 2 and smaller than 4"
29
+ # ...rather than:
30
+ # # => "be bigger than 2"
31
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
32
+ end
33
+
34
+ # rspec-mocks config goes here. You can use an alternate test double
35
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
36
+ config.mock_with :rspec do |mocks|
37
+ # Prevents you from mocking or stubbing a method that does not exist on
38
+ # a real object. This is generally recommended, and will default to
39
+ # `true` in RSpec 4.
40
+ mocks.verify_partial_doubles = true
41
+ end
42
+
43
+ # The settings below are suggested to provide a good initial experience
44
+ # with RSpec, but feel free to customize to your heart's content.
45
+ =begin
46
+ # These two settings work together to allow you to limit a spec run
47
+ # to individual examples or groups you care about by tagging them with
48
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
49
+ # get run.
50
+ config.filter_run :focus
51
+ config.run_all_when_everything_filtered = true
52
+
53
+ # Allows RSpec to persist some state between runs in order to support
54
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
55
+ # you configure your source control system to ignore this file.
56
+ config.example_status_persistence_file_path = "spec/examples.txt"
57
+
58
+ # Limits the available syntax to the non-monkey patched syntax that is
59
+ # recommended. For more details, see:
60
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
61
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
62
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
63
+ config.disable_monkey_patching!
64
+
65
+ # This setting enables warnings. It's recommended, but in some cases may
66
+ # be too noisy due to issues in dependencies.
67
+ config.warnings = true
68
+
69
+ # Many RSpec users commonly either run the entire suite or an individual
70
+ # file, and it's useful to allow more verbose output when running an
71
+ # individual spec file.
72
+ if config.files_to_run.one?
73
+ # Use the documentation formatter for detailed output,
74
+ # unless a formatter has already been configured
75
+ # (e.g. via a command-line flag).
76
+ config.default_formatter = 'doc'
77
+ end
78
+
79
+ # Print the 10 slowest examples and example groups at the
80
+ # end of the spec run, to help surface which specs are running
81
+ # particularly slow.
82
+ config.profile_examples = 10
83
+
84
+ # Run specs in random order to surface order dependencies. If you find an
85
+ # order dependency and want to debug it, you can fix the order by providing
86
+ # the seed, which is printed after each run.
87
+ # --seed 1234
88
+ config.order = :random
89
+
90
+ # Seed global randomization in this process using the `--seed` CLI option.
91
+ # Setting this allows you to use `--seed` to deterministically reproduce
92
+ # test failures related to randomization by passing the same `--seed` value
93
+ # as the one that triggered the failure.
94
+ Kernel.srand config.seed
95
+ =end
96
+ end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everything-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Tolle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-06 00:00:00.000000000 Z
11
+ date: 2016-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: fastenv
14
+ name: dotenv
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.2
19
+ version: 2.0.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.0.2
26
+ version: 2.0.2
27
27
  - !ruby/object:Gem::Dependency
28
- name: dotenv
28
+ name: fastenv
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.0.2
33
+ version: 0.0.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 2.0.2
40
+ version: 0.0.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.4'
61
+ version: '10.5'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.4'
68
+ version: '10.5'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '3.4'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '3.4'
83
83
  description: Gives you access to pieces within your everything repo.
84
84
  email:
85
85
  - kyle@nullsix.com
@@ -88,6 +88,8 @@ extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
+ - ".rspec"
92
+ - CHANGELOG.md
91
93
  - Gemfile
92
94
  - LICENSE
93
95
  - README.md
@@ -95,6 +97,9 @@ files:
95
97
  - lib/everything.rb
96
98
  - lib/everything/piece.rb
97
99
  - lib/everything/version.rb
100
+ - spec/everything/piece_spec.rb
101
+ - spec/everything_spec.rb
102
+ - spec/spec_helper.rb
98
103
  homepage: https://github.com/kyletolle/everything-core
99
104
  licenses:
100
105
  - MIT
@@ -119,5 +124,8 @@ rubygems_version: 2.4.5.1
119
124
  signing_key:
120
125
  specification_version: 4
121
126
  summary: Library for working with your `everything` repository.
122
- test_files: []
127
+ test_files:
128
+ - spec/everything/piece_spec.rb
129
+ - spec/everything_spec.rb
130
+ - spec/spec_helper.rb
123
131
  has_rdoc: