hackerearth_api 0.0.2 → 0.0.3

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: 5537254bf289c52e0db918429bb18a5aab7cc2d4be4bbc908fee5a5e976c0f23
4
- data.tar.gz: 514b215aa77243bc71bb5722f687659aeb4653992e6b1098ae7daa8ba9f8ba1c
3
+ metadata.gz: bcb62e90b2e5cdc4a0799a0b5f7b3a577d5a7c7de8e9f621e81f57cf016686a2
4
+ data.tar.gz: 9aec0848e9813386ce008b370378c479b2b0620a968fed493d63218dfcc58296
5
5
  SHA512:
6
- metadata.gz: 549efd586ba13969c86551c9755c0c3c56e26990fe317854cce5c157dc4640d57c20217ca089683d8ae3f3df69218912087a9cbf2e9b6bd2a2061f48b45a90c2
7
- data.tar.gz: 30706976ff1c5cdde6d13faec86d36242483a996cfbd7ba66a3795d5d458f7784007731f440873422fab4229da797424aa645c3404ab38f51f5c11f4f0592a4d
6
+ metadata.gz: 822a33b4771c781d7eefcdd53d97b299e2f1c57d0f74f1806b78bf7405fec87d14a66d8b72e694553158fe5b33e8f39acd5dadfee385556ddf7480343b0b1c8d
7
+ data.tar.gz: 624a555177d617bb81f1ff68f3582a7aa2bf19ed56f8c85527d4c5ac66759d1e2161f259c5478961d35c1bd595e736c60f55ace1dfb75a6a9deef03bf66276b9
data/Gemfile CHANGED
@@ -4,3 +4,7 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in hackerearth_api.gemspec
6
6
  gemspec
7
+
8
+ group :metrics do
9
+ gem 'coveralls', '~> 0.8.7', require: false
10
+ end
data/README.md CHANGED
@@ -1,4 +1,15 @@
1
1
  # HackerearthApi
2
+ [![Gem Version](https://badge.fury.io/rb/hackerearth_api.svg)][gem]
3
+ [![Build Status](https://secure.travis-ci.org/amandeep511997/hackerearth_api.svg?branch=master)][travis]
4
+ [![Maintainability](https://api.codeclimate.com/v1/badges/7b315b39ffc53300c155/maintainability)][maintainability]
5
+ [![Coverage Status](https://coveralls.io/repos/github/amandeep511997/hackerearth_api/badge.svg?branch=master)][coverall]
6
+ [![Dependency Status](https://gemnasium.com/badges/github.com/amandeep511997/hackerearth_api.svg)][gemnasium]
7
+
8
+ [gem]: http://badge.fury.io/rb/hackerearth_api
9
+ [travis]: https://travis-ci.org/amandeep511997/hackerearth_api
10
+ [maintainability]: (https://codeclimate.com/github/amandeep511997/hackerearth_api/maintainability)
11
+ [coverall]: (https://coveralls.io/github/amandeep511997/hackerearth_api?branch=master)
12
+ [gemnasium]: https://gemnasium.com/projects/github.com/amandeep511997/hackerearth_api
2
13
 
3
14
  A Ruby client for the official [Hackerearth API](https://www.hackerearth.com/docs/wiki/developers/v3/). Supports both the API endpoints. Can be used to compile and run code.
4
15
 
@@ -23,7 +34,7 @@ Or install it yourself as:
23
34
  ### Creating a Instance
24
35
  To start using gem, you can create a new client instance by passing the client_secret to the constructor as
25
36
  ```ruby
26
- hacker = HackerearthApi.new("[your-client-secret]")
37
+ hacker = HackerearthApi.new("[your-client-secret]")
27
38
  ```
28
39
 
29
40
  ### Setting Parameters
@@ -31,7 +42,7 @@ Since, the instance already has the client_secret you only need to pass rest of
31
42
 
32
43
  To view the list of languages supported you can do as follows
33
44
  ```ruby
34
- HackerearthApi.languages
45
+ HackerearthApi.languages
35
46
  ```
36
47
 
37
48
  'time_limit' and 'memory_limit' should be atmost 5 and 262144 respectively, any values greater than maximum value are set to the maximum value.
@@ -39,9 +50,9 @@ To view the list of languages supported you can do as follows
39
50
  ### Making a Request
40
51
  Now you can further make compile and run calls to the API as follows by passing the parameters mentioned in the API documentation, in the form of a hash.
41
52
  ```ruby
42
- hacker.compile({:source=>"puts('Hello World!')", :lang=>"RUBY"})
53
+ hacker.compile({:source=>"puts('Hello World!')", :lang=>"RUBY"})
43
54
 
44
- hacker.run({:source=>"puts('Hello World!')", :lang=>"RUBY"})
55
+ hacker.run({:source=>"puts('Hello World!')", :lang=>"RUBY"})
45
56
  ```
46
57
 
47
58
  ### Response from API
@@ -51,11 +62,11 @@ It will contain the response same as mentioned in the API documentation, along w
51
62
  ### Editing the Instance
52
63
  You can view or change the current objects client_secret
53
64
  ```ruby
54
- # To read
55
- hacker.client_secret_key
65
+ # To read
66
+ hacker.client_secret_key
56
67
 
57
- # To change
58
- hacker.client_secret= [new-client-secret]
68
+ # To change
69
+ hacker.client_secret= [new-client-secret]
59
70
  ```
60
71
 
61
72
  ## Contributing
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Amandeep Singh"]
9
9
  spec.email = ["amandeep511997@gmail.com"]
10
10
 
11
- spec.summary = %q{Ruby library for the Hackerearth API.}
11
+ spec.summary = %q{Ruby library for the Hackerearth API. Using HackerEarth API you can compile and run your code using their codeTable. }
12
12
  spec.homepage = "https://github.com/amandeep511997/hackerearth_api"
13
13
  spec.license = "MIT"
14
14
 
@@ -19,6 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
+ spec.required_ruby_version = '>= 2.0.0'
23
+
22
24
  spec.add_development_dependency "bundler", "~> 1.16"
23
25
  spec.add_development_dependency "rake", "~> 10.0"
24
26
  spec.add_development_dependency "rspec", "~> 3.0"
@@ -22,7 +22,3 @@ private
22
22
  return response
23
23
  end
24
24
  end
25
-
26
- =begin
27
- HTTParty.post("https://api.hackerearth.com/v3/code/compile/", body: { :client_secret=> "3905bf1332df91f3d9fc3b505dc18701ddae39a1", :source=> "puts('Hello World')", :lang=> "RUBY"})
28
- =end
@@ -1,3 +1,3 @@
1
1
  module HackerearthApi
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackerearth_api
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
  - Amandeep Singh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-26 00:00:00.000000000 Z
11
+ date: 2018-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - ">="
106
106
  - !ruby/object:Gem::Version
107
- version: '0'
107
+ version: 2.0.0
108
108
  required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - ">="
@@ -115,5 +115,6 @@ rubyforge_project:
115
115
  rubygems_version: 2.7.3
116
116
  signing_key:
117
117
  specification_version: 4
118
- summary: Ruby library for the Hackerearth API.
118
+ summary: Ruby library for the Hackerearth API. Using HackerEarth API you can compile
119
+ and run your code using their codeTable.
119
120
  test_files: []