lospec 0.1.0 → 0.1.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: 0dd31664ed14d707489f86eacf10037a7eb0875af1758100fcfea5673ed2ee9b
4
- data.tar.gz: a669cffe86b57fdae1a883cebce8a80e36c2535f74a6a2d19692e3f012c9c450
3
+ metadata.gz: 1d16f57063bfe9b39cecc937d439c456e9447d4b5a2bc9f651147f2c0ec955c0
4
+ data.tar.gz: 5c9ab9aab83fe6da651492852bce6d98f7bb186a301f0305509c135434e01e85
5
5
  SHA512:
6
- metadata.gz: 29657aed1c51c66c77a4d63da0acad77451d1e16c9e85be69919d86545b29ad6f5ceb67d9ec34631a80678e4a360339146b2ec3799f826c10a7f7e89f3e9092b
7
- data.tar.gz: d93a79509fb015c567da995ff35e6b1fd6246e015bfb40cf0fcc7c98e30d8f5e7e9248c667604efdf5607f6ac0bc70a19d3e9933c0c4de33955cfed259f7413a
6
+ metadata.gz: f2124cda520eb4c58029a76f94cacff817c868ac7629f91c3992304a60d72634880fb55be463671db4f3d72a67727d71fb131507eb0cb22ce903fbd9e807d1a7
7
+ data.tar.gz: 3a6caeb933f326320b691d99e0d8199f1178afeacd9378d7eb468e2ec505a5f9053776df1fcf3bd098e254c1309feef9387b9358e565373f831510d4b44687e9
data/README.md CHANGED
@@ -1,16 +1,16 @@
1
1
  # Lospec
2
2
 
3
- ## Installation
3
+ This gem is a simple interface to the color palettes available on lospec.com.
4
4
 
5
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
5
+ ## Installation
6
6
 
7
7
  Install the gem and add to the application's Gemfile by executing:
8
8
 
9
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
9
+ $ bundle add lospec
10
10
 
11
11
  If bundler is not being used to manage dependencies, install the gem by executing:
12
12
 
13
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
13
+ $ gem install lospec
14
14
 
15
15
  ## Usage
16
16
 
@@ -22,7 +22,7 @@ palette.slug # => "tropical-fruit-04"
22
22
  palette.colors # => ["f5b413", "9c1904", "dd0956", "250442"]
23
23
  ```
24
24
 
25
- You can also sort by most downloads first, and specify an endless range for colors. The available sort options are `%i[default alphabetical downloads newest]`.
25
+ You can also sort by most downloads first, and specify an endless range for colors. The available sort options are `:default`, `:alphabetical`, `:downloads`, and `:newest`.
26
26
  ```ruby
27
27
  palette = Lospec::Palette.search(colors: ..3, tag: 'black', sort: :downloads).first
28
28
 
@@ -48,6 +48,10 @@ palette = Lospec::Palette.fetch("nintendo-gameboy-bgb")
48
48
  palette.description # => "The default palette used by the bgb emulator..."
49
49
  ```
50
50
 
51
+ ## Considerations
52
+
53
+ Lospec does provide an API, by which you can fetch the name and colors of a palette by slug. It does not provide a formal API to obtain the additional details of the palette, nor an API to search for palettes. Therefore, this gem is an interface that wraps network calls made by the lospec.com frontend. To mitigate needless network calls, this library employs request caching and lazy collections. However, do be aware that the methods in this gem do make network requests to lospec.com, so care should be used to limit excessive usage. Read more [here](https://lospec.com/palettes/api).
54
+
51
55
  ## Development
52
56
 
53
57
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lospec
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lospec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John DeSilva
@@ -42,7 +42,6 @@ files:
42
42
  - lib/lospec/palette.rb
43
43
  - lib/lospec/palette/search.rb
44
44
  - lib/lospec/version.rb
45
- - lospec.gemspec
46
45
  - sig/lospec.rbs
47
46
  homepage: https://github.com/Aesthetikx/lospec
48
47
  licenses:
data/lospec.gemspec DELETED
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/lospec/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "lospec"
7
- spec.version = Lospec::VERSION
8
- spec.authors = ["John DeSilva"]
9
- spec.email = ["john@aesthetikx.info"]
10
-
11
- spec.summary = "A simple gem to fetch palettes from Lospec.com"
12
- spec.homepage = "https://github.com/Aesthetikx/lospec"
13
- spec.license = "MIT"
14
- spec.required_ruby_version = ">= 3.2.0"
15
-
16
- spec.metadata["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = spec.homepage
18
- spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
19
- spec.metadata["rubygems_mfa_required"] = "true"
20
-
21
- # Specify which files should be added to the gem when it is released.
22
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
- spec.files = Dir.chdir(__dir__) do
24
- `git ls-files -z`.split("\x0").reject do |f|
25
- (File.expand_path(f) == __FILE__) ||
26
- f.start_with?(*%w[bin/ test/ spec/ features/ .git appveyor Gemfile])
27
- end
28
- end
29
- spec.bindir = "exe"
30
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
- spec.require_paths = ["lib"]
32
-
33
- # Uncomment to register a new dependency of your gem
34
- spec.add_dependency "open-uri-cached", "~> 1"
35
-
36
- # For more information and examples about making a new gem, check out our
37
- # guide at: https://bundler.io/guides/creating_gem.html
38
- end