encuisine 0.1.0 → 0.2.0

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
  SHA256:
3
- metadata.gz: 898ee180446c1cacf6d3ff7af2ed4affb1d11a3f54193719215b8b39142efbfc
4
- data.tar.gz: 2fc247bd4c985e624297d5c8c8f277fb20c863517452e0b53c5566ab3f120ccf
3
+ metadata.gz: 8189e9495695627e7c695d50fd7167699337dc97bf6d0636bb7ce2df8b2deab0
4
+ data.tar.gz: 506fd510034bde188e6e090b9bb4589a72d6b70cd851cd8225eaeac171655627
5
5
  SHA512:
6
- metadata.gz: 32777259df90d001902b5e491fdebf33e010a2f4300c2bb8217425ceb7b55cc45b8d2337b9bff247ef519bf2f6821fc6a5c5d8d9069cd3f90e02ec7d54069c32
7
- data.tar.gz: a92f631992e617fb18138672f654220f64b170c0c13133b516ff4781dbb1a12d568777d314a36c5469a46db23cea9cfa9bf1c7f0c69dbcd5980b393e4d50cc73
6
+ metadata.gz: a5e123ac89cfec302e2b1ae9061244c24dded8f7439ed0a19e98c8d4e2fe7672f681a45dbdbcba435219141ae58c42269efb037c101c6656da5d11d5f72bcebc
7
+ data.tar.gz: 29699b9fd03fc32b6ee08d7b23d5c785b01cd03775f9c4f0847c6cf9ad41e10b441727c3877bc658c2eec5ef2c7618f51e63b9690518f32df86a0bd56720f1c5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.0] - 2022-04-15
4
+
5
+ - Add list all recipes
6
+
3
7
  ## [0.1.0] - 2022-04-08
4
8
 
5
9
  - Initial release
data/Gemfile CHANGED
@@ -5,8 +5,7 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in encuisine.gemspec
6
6
  gemspec
7
7
 
8
+ gem "faraday", "~> 2.2"
8
9
  gem "rake", "~> 13.0"
9
-
10
10
  gem "rspec", "~> 3.0"
11
-
12
11
  gem "rubocop", "~> 1.21"
data/README.md CHANGED
@@ -15,6 +15,9 @@ If bundler is not being used to manage dependencies, install the gem by executin
15
15
  ```ruby
16
16
  require 'encuisine'
17
17
 
18
+ # List all recipes
19
+ Encuisine::Recipe.all
20
+
18
21
  # Search a recipe
19
22
  Encuisine::Recipe.search("Smoothie")
20
23
 
data/encuisine.gemspec ADDED
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/encuisine/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "encuisine"
7
+ spec.version = Encuisine::VERSION
8
+ spec.authors = ["Cyril Blaecke"]
9
+ spec.email = ["cyril@dilolabs.fr"]
10
+
11
+ spec.summary = "En Cuisine API wrapper"
12
+ spec.description = "En Cuisine ! API wrapper, the open database about recipes."
13
+ spec.homepage = "https://github.com/encuisineorg/encuisine-ruby"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = spec.homepage
21
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/CHANGELOG.md"
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
28
+ end
29
+ end
30
+ spec.bindir = "exe"
31
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
+ spec.require_paths = ["lib"]
33
+
34
+ spec.add_dependency "faraday", "~> 2.2"
35
+ end
@@ -3,6 +3,10 @@
3
3
  module Encuisine
4
4
  class Recipe
5
5
  class << self
6
+ def all
7
+ response = Connection.json.get("#{BASE_URL}/api/v1/recipes")
8
+ end
9
+
6
10
  def get(id)
7
11
  if id
8
12
  response = Connection.json.get("#{BASE_URL}/api/v1/recipes/#{id}")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Encuisine
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: encuisine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Blaecke
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-09 00:00:00.000000000 Z
11
+ date: 2022-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -39,6 +39,7 @@ files:
39
39
  - LICENSE.txt
40
40
  - README.md
41
41
  - Rakefile
42
+ - encuisine.gemspec
42
43
  - lib/encuisine.rb
43
44
  - lib/encuisine/connection.rb
44
45
  - lib/encuisine/recipe.rb