valid_syntax 0.1.1 → 1.0.0

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
  SHA1:
3
- metadata.gz: b33335801463a8603f75d9ccc1fab9eb940fdaa6
4
- data.tar.gz: 837e0d5311a30c440282da4828a5995caa354cc4
3
+ metadata.gz: 6c9a01c048b1341418bd6435fdfd45e6104c3fc8
4
+ data.tar.gz: e793a860cd8e5d71100a6f479f176b60e2470e14
5
5
  SHA512:
6
- metadata.gz: f28fcd236521924ecb57ae43b41e7084bd4bb4193d4c6201961deae66244f87ab8854a57f5035a498b3c781be17818bd330d8c9a07d8f8aa0c4fade93ca7367e
7
- data.tar.gz: bb1ecb76497ff49f2da1d14d28d84c3566d491e96629c9254d539a1a4a186077fb6988fb593eab4db07e36440c80c0f9f1a809730c8c965ba549ddcc0a43aa65
6
+ metadata.gz: cd6321ea596268a1549d392bac9e5ef38a21166f296864d90684ee6205a7472ab8c095eada5bf51fcf3f01d261ed3da4c59a61514b02576ada82cb7c5e5edebd
7
+ data.tar.gz: e93acbb52015fef01da5171940c040b2ee7c3edca7be9b24adc21c65a0716e84c708e84c100a592e4e39e92c46273672c6f3b809648d1910c0da27612238f108
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # ValidSyntax
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/valid_syntax`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This gem checks if a string containing ruby code has any syntax errors. If this is the case, the syntax errors will be stored to be later accessed.
6
4
 
7
5
  ## Installation
8
6
 
@@ -21,8 +19,17 @@ Or install it yourself as:
21
19
  $ gem install valid_syntax
22
20
 
23
21
  ## Usage
22
+ ```
23
+ some_valid_code = "def sum; 2+3; end"
24
+ some_invalid_code = "defs sum; 2+3; end"
25
+
26
+ some_valid_code.has_valid_syntax # true
27
+ some_invalid_code.has_valid_syntax # false
28
+
29
+ some_invalid_code.syntax_errors # will return a string containing the syntax errors
30
+
31
+ ```
24
32
 
25
- TODO: Write usage instructions here
26
33
 
27
34
  ## Development
28
35
 
@@ -1,4 +1,4 @@
1
1
  module ValidSyntax
2
2
  RAILS_VERSION = "4.2.0"
3
- VERSION = "0.1.1"
3
+ VERSION = "1.0.0"
4
4
  end
@@ -23,8 +23,6 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ["lib"]
25
25
 
26
- spec.add_dependency 'rails', ValidSyntax::RAILS_VERSION
27
-
28
26
  spec.add_development_dependency "bundler", "~> 1.9"
29
27
  spec.add_development_dependency "rake", "~> 10.0"
30
28
  spec.add_development_dependency "rspec", "~> 3.0"
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valid_syntax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-05-15 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rails
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '='
18
- - !ruby/object:Gem::Version
19
- version: 4.2.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '='
25
- - !ruby/object:Gem::Version
26
- version: 4.2.0
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: bundler
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -106,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
92
  version: '0'
107
93
  requirements: []
108
94
  rubyforge_project:
109
- rubygems_version: 2.4.5
95
+ rubygems_version: 2.4.5.1
110
96
  signing_key:
111
97
  specification_version: 4
112
98
  summary: Check and store syntax errors or ruby code without executing it