joplin 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/Makefile +3 -0
- data/joplin.gemspec +3 -3
- data/lib/joplin/version.rb +1 -1
- data/lib/joplin.rb +9 -0
- metadata +7 -8
- data/lib/joplin/token.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b4f629e9d1111d44489677862012bb90708a49838db1c0453765e6c5e02cfb7
|
4
|
+
data.tar.gz: 54299abfa751d6fa58c0750e8dcf6e1a452124d2495b5604430ada3348574766
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e53f9e2c97f333220afe60a2f0972d783c917c5b94973464225daa544f12d0e9813870ec56a259bcb08a5029cabd90952ff7784a5eed26c23452abcae010faee
|
7
|
+
data.tar.gz: 1e88e83442899c217e413415af68ebdc7b71450c11086031b36508b8e90819a3e85c313fb9e2eb244465ff48737a38e6091d1b1f32d603f07c3cf37296e619f3
|
data/Gemfile.lock
CHANGED
data/Makefile
CHANGED
data/joplin.gemspec
CHANGED
@@ -11,15 +11,15 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = %q{joplin API}
|
13
13
|
spec.description = %q{joplin API}
|
14
|
-
spec.homepage = "http://github.com/danielb2/joplin"
|
14
|
+
spec.homepage = "http://github.com/danielb2/joplin-ruby"
|
15
15
|
spec.license = "MIT"
|
16
16
|
|
17
17
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
18
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
19
|
if spec.respond_to?(:metadata)
|
20
20
|
spec.metadata["homepage_uri"] = spec.homepage
|
21
|
-
spec.metadata["source_code_uri"] = "http://github.com/danielb2/joplin"
|
22
|
-
spec.metadata["changelog_uri"] = "http://github.com/danielb2/joplin"
|
21
|
+
spec.metadata["source_code_uri"] = "http://github.com/danielb2/joplin-ruby"
|
22
|
+
spec.metadata["changelog_uri"] = "http://github.com/danielb2/joplin-ruby"
|
23
23
|
else
|
24
24
|
raise "RubyGems 2.0 or newer is required to protect against " \
|
25
25
|
"public gem pushes."
|
data/lib/joplin/version.rb
CHANGED
data/lib/joplin.rb
CHANGED
@@ -17,6 +17,15 @@ module Joplin
|
|
17
17
|
return parsed
|
18
18
|
end
|
19
19
|
|
20
|
+
def self.get_token
|
21
|
+
begin
|
22
|
+
settings = JSON.parse File.read("#{ENV['HOME']}/.config/joplin-desktop/settings.json")
|
23
|
+
return settings['api.token']
|
24
|
+
rescue
|
25
|
+
return nil
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
20
29
|
def self.token
|
21
30
|
@@token
|
22
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: joplin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Bretoi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -102,15 +102,14 @@ files:
|
|
102
102
|
- bin/setup
|
103
103
|
- joplin.gemspec
|
104
104
|
- lib/joplin.rb
|
105
|
-
- lib/joplin/token.rb
|
106
105
|
- lib/joplin/version.rb
|
107
|
-
homepage: http://github.com/danielb2/joplin
|
106
|
+
homepage: http://github.com/danielb2/joplin-ruby
|
108
107
|
licenses:
|
109
108
|
- MIT
|
110
109
|
metadata:
|
111
|
-
homepage_uri: http://github.com/danielb2/joplin
|
112
|
-
source_code_uri: http://github.com/danielb2/joplin
|
113
|
-
changelog_uri: http://github.com/danielb2/joplin
|
110
|
+
homepage_uri: http://github.com/danielb2/joplin-ruby
|
111
|
+
source_code_uri: http://github.com/danielb2/joplin-ruby
|
112
|
+
changelog_uri: http://github.com/danielb2/joplin-ruby
|
114
113
|
post_install_message:
|
115
114
|
rdoc_options: []
|
116
115
|
require_paths:
|
@@ -126,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
125
|
- !ruby/object:Gem::Version
|
127
126
|
version: '0'
|
128
127
|
requirements: []
|
129
|
-
rubygems_version: 3.0.
|
128
|
+
rubygems_version: 3.0.9
|
130
129
|
signing_key:
|
131
130
|
specification_version: 4
|
132
131
|
summary: joplin API
|
data/lib/joplin/token.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require "sqlite3"
|
2
|
-
module Joplin
|
3
|
-
module Token
|
4
|
-
def self.get
|
5
|
-
begin
|
6
|
-
db = SQLite3::Database.new "#{ENV['HOME']}/.config/joplin-desktop/database.sqlite"
|
7
|
-
rows = db.execute("select value from settings where key='api.token';")
|
8
|
-
return rows.flatten.first
|
9
|
-
rescue
|
10
|
-
return nil
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|