rails-rail-in 0.0.1 → 0.0.2

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: b8490db61c9d2ca2d693f816a0a4d808d10537ad
4
- data.tar.gz: 42a3c1bc1cf6e6533404454d83605faed952cde3
3
+ metadata.gz: ff2bbe6e65a7e64e8dc37f55661278dcfed7af16
4
+ data.tar.gz: 0313b4a21451b0e3287028b091e0c373849e8ee1
5
5
  SHA512:
6
- metadata.gz: 85d5be96736e4775dfd2a02e4e86e71b89e8d4d2a0f6706d3f0fc7a8d9b23d53fd910f25594e162e98cc533dbb25acd5d6cc3fd02ea292f005fd5bacaf1f5216
7
- data.tar.gz: 40830e63b9fe6c39dc34b2b49912291a76ef7d6251905f7ee390f3915b42bd684257d9d402ef303a8c438905d86e369605cfd226209f43805b22b3dc73305053
6
+ metadata.gz: 28c97bef8070045c8fd1a031ecd81f9b5372258db65954cb72d32e03fc1c5ee74ec6ec1ebd9921c83ebc2398684654a1e6ae740f30a25a62bbb81aa4de82eace
7
+ data.tar.gz: 2e1d8148d7007a2e2f7f598e2e0550a1957bd90c1bd00316194e48f58944ebecd059578060edf3d5880fd87041014a475daa4c6038d6238a1fce880c9b71a203
data/README.md CHANGED
@@ -20,7 +20,8 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Write usage instructions here
23
+ var1 = Rails::Rail::In.pnr_status(your_pnr_number)
24
+ <!-- You will get JSON response -->
24
25
 
25
26
  ## Contributing
26
27
 
data/lib/rails/rail/in.rb CHANGED
@@ -1,11 +1,15 @@
1
1
  require "rails/rail/in/version"
2
+ require 'rest_client'
2
3
 
3
4
  module Rails
4
5
  module Rail
5
6
  module In
6
- # Your code goes here...
7
- def self.get_pnr
8
- "4102725167"
7
+ def self.pnr_status(pnr_no)
8
+ RestClient.get "http://api.erail.in/pnr?key=fd3ebf59-3ed8-424f-a99d-5cfad4337d94&#{pnr_no}"
9
+ end
10
+
11
+ def self.base_url
12
+ "http://api.erail.in/"
9
13
  end
10
14
  end
11
15
  end
@@ -1,7 +1,7 @@
1
1
  module Rails
2
2
  module Rail
3
3
  module In
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.2"
5
5
  end
6
6
  end
7
7
  end
Binary file
@@ -9,10 +9,10 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["psaravanan11"]
10
10
  spec.email = ["psaravanan11@gmail.com"]
11
11
  spec.summary = %q{Indian Railways Trains, PNR Status}
12
- spec.description = %q{Indian Railways Trains, Rail, IRCTC Reservation, IRCTC Availability, PNR Status, Running Status, Map, Arrival Departure, Route, Fare Check}
12
+ spec.description = %q{Indian Railways Trains, PNR Status, Features to come IRCTC Availability, Running Status, Map, Arrival Departure, Route, Fare Check...}
13
13
  spec.homepage = ""
14
14
  spec.license = "MIT"
15
-
15
+ spec.rubyforge_project = "rest_client"
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)/})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-rail-in
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - psaravanan11
@@ -38,8 +38,8 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- description: Indian Railways Trains, Rail, IRCTC Reservation, IRCTC Availability,
42
- PNR Status, Running Status, Map, Arrival Departure, Route, Fare Check
41
+ description: Indian Railways Trains, PNR Status, Features to come IRCTC Availability,
42
+ Running Status, Map, Arrival Departure, Route, Fare Check...
43
43
  email:
44
44
  - psaravanan11@gmail.com
45
45
  executables: []
@@ -53,6 +53,7 @@ files:
53
53
  - Rakefile
54
54
  - lib/rails/rail/in.rb
55
55
  - lib/rails/rail/in/version.rb
56
+ - rails-rail-in-0.0.1.gem
56
57
  - rails-rail-in.gemspec
57
58
  homepage: ''
58
59
  licenses:
@@ -73,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
74
  - !ruby/object:Gem::Version
74
75
  version: '0'
75
76
  requirements: []
76
- rubyforge_project:
77
+ rubyforge_project: rest_client
77
78
  rubygems_version: 2.4.4
78
79
  signing_key:
79
80
  specification_version: 4