Oct
NOV
Dec
18
2019
2020
2021
About this capture
Organization:
Internet Archive
Focused crawls are collections of frequently-updated webcrawl data from narrow (as opposed to broad or wide) web crawls, often focused on a single domain or subdomain.
T h e W a y b a c k M a c h i n e - h t t p : / / w e b . a r c h i v e . o r g / w e b / 2 0 2 0 1 1 1 8 0 3 3 2 0 9 / h t t p s : / / g i t h u b . c o m / g i t h u b / g i t h u b - d s
S k i p t o c o n t e n t
/ ; r e f _ c t a : S i g n u p ; r e f _ l o c : h e a d e r l o g g e d o u t " >
S i g n up
●
F e a t u r e s →
● C o d e r e v i e w
● P r o j e c t m a n a g e m e n t
● I n t e g r a t i o n s
● A c t i o n s
● P a c k a g e s
● S e c u r i t y
● T e a m m a n a g e m e n t
● H o s t i n g
● M o b i l e
● C u s t o m e r s t o r i e s →
● S e c u r i t y →
●
●
●
● E x p l o r e G i t H u b →
L e a r n & c o n t r i b u t e
● T o p i c s
● C o l l e c t i o n s
● T r e n d i n g
● L e a r n i n g L a b
● O p e n s o u r c e g u i d e s
C o n n e c t w i t h o t h e r s
● E v e n t s
● C o m m u n i t y f o r u m
● G i t H u b E d u c a t i o n
● G i t H u b S t a r s p r o g r a m
●
●
P l a n s →
● C o m p a r e p l a n s
● C o n t a c t S a l e s
● N o n p r o f i t →
● E d u c a t i o n →
In this repository
All GitHub
↵
Jump to
↵
No suggested jump to results
{ { m e s s a g e } }
●
W a t c h
1 5 0
●
S t a r
5 7 2
●
F o r k
34
A c o l l e c t i o n o f R u b y l i b r a r i e s f o r w o r k i n g w i t h S Q L o n t o p o f A c t i v e R e c o r d ' s c o n n e c t i o n
M I T L i c e n s e
5 7 2
s t a r s
34
f o r k s
S t a r
W a t c h
●
C o d e
●
I s s u e s
1
●
P u l l r e q u e s t s
0
●
A c t i o n s
●
P r o j e c t s
0
●
S e c u r i t y
●
I n s i g h t s
M o r e
●
C o d e
●
I s s u e s
●
P u l l r e q u e s t s
●
A c t i o n s
●
P r o j e c t s
●
S e c u r i t y
●
I n s i g h t s
D i s m i s s
J o i n G i t H u b t o d a y
G i t H u b i s h o m e t o o v e r 5 0 m i l l i o n d e v e l o p e r s w o r k i n g t o g e t h e r t o h o s t a n d r e v i e w c o d e , m a n a g e p r o j e c t s , a n d b u i l d s o f t w a r e t o g e t h e r .
S i g n u p
G i t H u b i s w h e r e t h e w o r l d b u i l d s s o f t w a r e
M i l l i o n s o f d e v e l o p e r s a n d c o m p a n i e s b u i l d , s h i p , a n d m a i n t a i n t h e i r s o f t w a r e o n G i t H u b — t h e l a r g e s t a n d m o s t a d v a n c e d d e v e l o p m e n t p l a t f o r m i n t h e w o r l d .
S i g n u p f o r f r e e
D i s m i s s
1
b r a n c h
16
t a g s
G o t o f i l e
C o d e
C l o n e
U s e G i t o r c h e c k o u t w i t h S V N u s i n g t h e w e b U R L .
W o r k f a s t w i t h o u r o f f i c i a l C L I .
L e a r n m o r e .
●
O p e n w i t h G i t H u b D e s k t o p
●
D o w n l o a d Z I P
L a u n c h i n g G i t H u b D e s k t o p
I f n o t h i n g h a p p e n s , d o w n l o a d G i t H u b D e s k t o p a n d t r y a g a i n .
G o b a c k
L a u n c h i n g G i t H u b D e s k t o p
I f n o t h i n g h a p p e n s , d o w n l o a d G i t H u b D e s k t o p a n d t r y a g a i n .
G o b a c k
L a u n c h i n g X c o d e
I f n o t h i n g h a p p e n s , d o w n l o a d X c o d e a n d t r y a g a i n .
G o b a c k
L a u n c h i n g V i s u a l S t u d i o
I f n o t h i n g h a p p e n s , d o w n l o a d t h e G i t H u b e x t e n s i o n f o r V i s u a l S t u d i o a n d t r y a g a i n .
G o b a c k
L a t e s t c o m m i t
c r y p t o q u e
M e r g e p u l l r e q u e s t # 5 1 f r o m g i t h u b / f i x - i n c r e m e n t - t o u c h
…
3 0 f 2 0 e 8
N o v 1 6 , 2 0 2 0
M e r g e p u l l r e q u e s t # 5 1 f r o m g i t h u b / f i x - i n c r e m e n t - t o u c h
Updating expired_at field for expired kv entries during increment
3 0 f 2 0 e 8
G i t s t a t s
●
2 5 3
c o m m i t s
F i l e s
P e r m a l i n k
F a i l e d t o l o a d l a t e s t c o m m i t i n f o r m a t i o n .
T y p e
N a m e
L a t e s t c o m m i t m e s s a g e
C o m m i t t i m e
e x a m p l e s
O n l y c r e a t e d a t a b a s e i f n o t e x i s t i n g
A u g 3 1 , 2 0 1 7
l i b
a d d a d d i t i o n a l c o n d i t i o n t o u p d a t e e x p i r e s _ a t f o r a u t h r a t e l i m i t
N o v 6 , 2 0 2 0
s c r i p t
R e q u i r e t h e t o p l i b r a r y
A p r 1 2 , 2 0 1 7
t e s t
U p d a t e t o n e w e r r u b y v e r s i o n s
J u n 1 6 , 2 0 2 0
. g i t i g n o r e
I g n o r e d b d i r e c t o r y
M a y 2 2 , 2 0 1 7
. t r a v i s . y m l
U p d a t e t o n e w e r r u b y v e r s i o n s
J u n 1 6 , 2 0 2 0
C H A N G E L O G . m d
B u m p v e r s i o n f o r r e l e a s e
M a y 1 1 , 2 0 1 8
C O D E _ O F _ C O N D U C T . m d
I n i t i a l c o m m i t o f g e m w i t h G i t H u b : : D a t a : : R e s u l t
M a r 1 3 , 2 0 1 7
C O N T R I B U T I N G . m d
T h e l a s t r e n a m e , I p r o m i s e . . .
M a r 2 4 , 2 0 1 7
G e m f i l e
U p d a t e t e s t s t o s u p p o r t n e w e r r a i l s v e r s i o n s
J u n 1 5 , 2 0 2 0
L I C E N S E . t x t
L i c e n s e t o g i t h u b
M a r 1 5 , 2 0 1 7
R E A D M E . m d
U p d a t e R E A D M E . m d
D e c 1 9 , 2 0 1 9
R a k e f i l e
I n i t i a l c o m m i t o f g e m w i t h G i t H u b : : D a t a : : R e s u l t
M a r 1 3 , 2 0 1 7
d o c k e r - c o m p o s e . y m l
A d d d o c k e r - c o m p o s e f i l e f o r e a s e o f l o c a l t e s t i n g
M a r 2 , 2 0 1 8
g i t h u b - d s . g e m s p e c
A d d a b u i l d f o r r a i l s 6 . 0 a n d u p d a t e i t t o p a s s
J u n 1 5 , 2 0 2 0
V i e w c o d e
R E A D M E . m d
G i t H u b : : D S
G i t H u b : : D S i s a c o l l e c t i o n o f R u b y l i b r a r i e s f o r w o r k i n g w i t h S Q L o n t o p o f A c t i v e R e c o r d ' s c o n n e c t i o n .
● G i t H u b : : K V i s a k e y / v a l u e d a t a s t o r e b a c k e d b y M y S Q L .
● G i t H u b : : S Q L i s f o r b u i l d i n g a n d e x e c u t i n g a S Q L q u e r y . T h i s c l a s s u s e s A c t i v e R e c o r d ' s c o n n e c t i o n c l a s s , b u t p r o v i d e s a b e t t e r A P I f o r b i n d v a l u e s a n d r a w d a t a a c c e s s .
● G i t H u b : : R e s u l t m a k e s i t e a s i e r t o b a k e i n r e s i l i e n c y t h r o u g h t h e u s e o f a R e s u l t o b j e c t i n s t e a d o f r a i s i n g e x c e p t i o n s .
C u r r e n t S t a t u s : U s e d i n p r o d u c t i o n e x t e n s i v e l y a t G i t H u b . B e c a u s e o f t h i s , a l l c h a n g e s w i l l b e t h o r o u g h l y v e t t e d , w h i c h c o u l d s l o w d o w n t h e p r o c e s s o f c o n t r i b u t i n g . W e w i l l d o o u r b e s t t o a c t i v e l y c o m m u n i c a t e s t a t u s o f p u l l r e q u e s t s w i t h a n y c o n t r i b u t o r s . I f y o u h a v e a n y s u b s t a n t i a l c h a n g e s t h a t y o u w o u l d l i k e t o m a k e , i t w o u l d b e g r e a t t o f i r s t o p e n a n i s s u e t o d i s c u s s t h e m w i t h u s .
I n s t a l l a t i o n
A d d t h i s l i n e t o y o u r a p p l i c a t i o n ' s G e m f i l e :
gem 'github-ds'
A n d t h e n e x e c u t e :
$ bundle
O r i n s t a l l i t y o u r s e l f a s :
$ gem install github-ds
U s a g e
B e l o w i s a t a s t e o f w h a t y o u c a n d o w i t h t h e s e l i b r a r i e s . I f y o u w a n t t o s e e m o r e , c h e c k o u t t h e e x a m p l e s d i r e c t o r y .
G i t H u b : : K V
F i r s t , y o u ' l l n e e d t o c r e a t e t h e k e y _ v a l u e s t a b l e u s i n g t h e i n c l u d e d R a i l s m i g r a t i o n g e n e r a t o r .
rails generate github:ds:active_record
rails db:migrate
I f y o u n e e d t o c h a n g e t h e n a m e o f t h e t a b l e u s e d f o r s t o r i n g t h e k e y - v a l u e s , y o u c a n c o n f i g u r e y o u r t a b l e n a m e a s s u c h , b e f o r e r u n n i n g t h e m i g r a t i o n :
GitHub::KV.configure do |config|
config.table_name = "new_key_values_table"
end
O n c e y o u h a v e c r e a t e d a n d e x e c u t e d t h e m i g r a t i o n , K V c a n d o n e a t t h i n g s l i k e t h i s :
require "pp"
# Create new instance using ActiveRecord's default connection.
kv = GitHub ::KV . new { ActiveRecord ::Base . connection }
# Get a key.
pp kv . get ( "foo" )
#<GitHub::Result:0x3fd88cd3ea9c value: nil>
# Set a key.
kv . set ( "foo" , "bar" )
# nil
# Get the key again.
pp kv . get ( "foo" )
#<GitHub::Result:0x3fe810d06e4c value: "bar">
# Get multiple keys at once.
pp kv . mget ( [ "foo" , "bar" ] )
#<GitHub::Result:0x3fccccd1b57c value: ["bar", nil]>
# Check for existence of a key.
pp kv . exists ( "foo" )
#<GitHub::Result:0x3fd4ae55ce8c value: true>
# Check for existence of key that does not exist.
pp kv . exists ( "bar" )
#<GitHub::Result:0x3fd4ae55c554 value: false>
# Check for existence of multiple keys at once.
pp kv . mexists ( [ "foo" , "bar" ] )
#<GitHub::Result:0x3ff1e98e18e8 value: [true, false]>
# Set a key's value if the key does not already exist.
pp kv . setnx ( "foo" , "bar" )
# false
# Delete a key.
pp kv . del ( "bar" )
# nil
# Delete multiple keys at once.
pp kv . mdel ( [ "foo" , "bar" ] )
# nil
G i t H u b : : S Q L
# Select, insert, update, delete or whatever you need...
GitHub ::SQL . results <<-SQL
SELECT * FROM example_key_values
SQL
GitHub ::SQL . run <<-SQL , key : "foo" , value : "bar"
INSERT INTO example_key_values (`key`, `value`)
VALUES (:key, :value)
SQL
GitHub ::SQL . value <<-SQL , key : "foo"
SELECT value FROM example_key_values WHERE `key` = :key
SQL
# Or slowly build up a query based on conditionals...
sql = GitHub ::SQL . new <<-SQL
SELECT `value` FROM example_key_values
SQL
key = ENV [ "KEY" ]
unless key . nil?
sql . add <<-SQL , key : key
WHERE `key` = :key
SQL
end
limit = ENV [ "LIMIT" ]
unless limit . nil?
sql . add <<-SQL , limit : limit . to_i
ORDER BY `key` ASC
LIMIT :limit
SQL
end
p sql . results
G i t H u b : : R e s u l t
def do_something
1
end
def do_something_that_errors
raise "noooooppppeeeee"
end
result = GitHub ::Result . new { do_something }
p result . ok? # => true
p result . value! # =>1
result = GitHub ::Result . new { do_something_that_errors }
p result . ok? # => false
p result . value { "default when error happens" } # => "default when error happens"
begin
result . value! # raises exception because error happened
rescue => error
p result . error
p error
end
# Outputs Step 1, 2, 3
result = GitHub ::Result . new {
GitHub ::Result . new { puts "Step 1: success!" }
} . then { |value |
GitHub ::Result . new { puts "Step 2: success!" }
} . then { |value |
GitHub ::Result . new { puts "Step 3: success!" }
}
p result . ok? # => true
# Outputs Step 1, 2 and stops.
result = GitHub ::Result . new {
GitHub ::Result . new { puts "Step 1: success!" }
} . then { |value |
GitHub ::Result . new {
puts "Step 2: failed!"
raise
}
} . then { |value |
GitHub ::Result . new {
puts "Step 3: should not get here because previous step failed!"
}
}
p result . ok? # => false
C a v e a t s
G i t H u b : : K V E x p i r a t i o n
K V s u p p o r t s e x p i r i n g k e y s a n d o b e y s e x p i r a t i o n w h e n p e r f o r m i n g o p e r a t i o n s , b u t d o e s n o t a c t u a l l y p u r g e e x p i r e d r o w s . A t G i t H u b , w e u s e p t - a r c h i v e r t o n i b b l e e x p i r e d r o w s . W e c o n f i g u r e i t t o d o a r e p l i c a l a g c h e c k a n d u s e t h e f o l l o w i n g o p t i o n s :
● i n d e x _ n a m e : " i n d e x _ k e y _ v a l u e s _ o n _ e x p i r e s _ a t "
● l i m i t : 1 0 0 0
● w h e r e : " e x p i r e s _ a t < = N O W ( ) "
D e v e l o p m e n t
A f t e r c h e c k i n g o u t t h e r e p o , r u n s c r i p t / b o o t s t r a p t o i n s t a l l d e p e n d e n c i e s . T h e n , r u n s c r i p t / t e s t t o r u n t h e t e s t s . Y o u c a n a l s o r u n s c r i p t / c o n s o l e f o r a n i n t e r a c t i v e p r o m p t t h a t w i l l a l l o w y o u t o e x p e r i m e n t .
N o t e : Y o u w i l l n e e d a M y S Q L d a t a b a s e w i t h n o p a s s w o r d s e t f o r t h e r o o t u s e r f o r t h e t e s t s . R u n n i n g d o c k e r - c o m p o s e u p w i l l b o o t j u s t t h a t . T h i s f u n c t i o n a l i t y i s n o t c u r r e n t l y u s e d b y G i t H u b a n d w a s f r o m a c o n t r i b u t o r , s o p l e a s e l e t u s k n o w i f i t d o e s n o t w o r k o r g e t s o u t o f d a t e ( p u l l r e q u e s t i s b e s t , b u t a n i s s u e w i l l d o ) .
T o i n s t a l l t h i s g e m o n t o y o u r l o c a l m a c h i n e , r u n s c r i p t / i n s t a l l . T o r e l e a s e a n e w v e r s i o n , u p d a t e t h e v e r s i o n n u m b e r i n v e r s i o n . r b , c o m m i t , a n d t h e n r u n s c r i p t / r e l e a s e , w h i c h w i l l c r e a t e a g i t t a g f o r t h e v e r s i o n , p u s h g i t c o m m i t s a n d t a g s , a n d p u s h t h e . g e m f i l e t o r u b y g e m s . o r g .
C o n t r i b u t i n g
B u g r e p o r t s a n d p u l l r e q u e s t s a r e w e l c o m e o n G i t H u b a t h t t p s : / / g i t h u b . c o m / g i t h u b / g i t h u b - d s . T h i s p r o j e c t i s i n t e n d e d t o b e a s a f e , w e l c o m i n g s p a c e f o r c o l l a b o r a t i o n , a n d c o n t r i b u t o r s a r e e x p e c t e d t o a d h e r e t o t h e C o n t r i b u t o r C o v e n a n t c o d e o f c o n d u c t . W e r e c o m m e n d r e a d i n g t h e c o n t r i b u t i n g g u i d e a s w e l l .
R o a d m a p
N o t h i n g c u r r e n t l y o n o u r r a d a r o t h e r t h a n c o n t i n u e d m a i n t e n a n c e . H a v e a b i g i d e a ? L e t u s k n o w .
M a i n t a i n e r s
L i c e n s e
T h e g e m i s a v a i l a b l e a s o p e n s o u r c e u n d e r t h e t e r m s o f t h e M I T L i c e n s e .
A b o u t
A c o l l e c t i o n o f R u b y l i b r a r i e s f o r w o r k i n g w i t h S Q L o n t o p o f A c t i v e R e c o r d ' s c o n n e c t i o n
T o p i c s
r u b y
r a i l s
a c t i v e r e c o r d
m y s q l
k e y - v a l u e
s q l
R e s o u r c e s
R e a d m e
L i c e n s e
M I T L i c e n s e
16
t a g s
N o p a c k a g e s p u b l i s h e d
+ 7 c o n t r i b u t o r s
L a n g u a g e s
●
R u b y
9 9 . 6 %
●
S h e l l
0 . 4 %
● © 2 0 2 0 G i t H u b , I n c .
● T e r m s
● P r i v a c y
●
C o o k i e P r e f e r e n c e s
● S e c u r i t y
● S t a t u s
● H e l p
● C o n t a c t G i t H u b
● P r i c i n g
● A P I
● T r a i n i n g
● B l o g
● A b o u t
Y o u c a n ’ t p e r f o r m t h a t a c t i o n a t t h i s t i m e .
Y o u s i g n e d i n w i t h a n o t h e r t a b o r w i n d o w . R e l o a d t o r e f r e s h y o u r s e s s i o n .
Y o u s i g n e d o u t i n a n o t h e r t a b o r w i n d o w . R e l o a d t o r e f r e s h y o u r s e s s i o n .
W e u s e o p t i o n a l t h i r d - p a r t y a n a l y t i c s c o o k i e s t o u n d e r s t a n d h o w y o u u s e G i t H u b . c o m s o w e c a n b u i l d b e t t e r p r o d u c t s .
L e a r n m o r e .
A c c e p t
R e j e c t
W e u s e o p t i o n a l t h i r d - p a r t y a n a l y t i c s c o o k i e s t o u n d e r s t a n d h o w y o u u s e G i t H u b . c o m s o w e c a n b u i l d b e t t e r p r o d u c t s .
Y o u c a n a l w a y s u p d a t e y o u r s e l e c t i o n b y c l i c k i n g C o o k i e P r e f e r e n c e s a t t h e b o t t o m o f t h e p a g e .
F o r m o r e i n f o r m a t i o n , s e e o u r P r i v a c y S t a t e m e n t .
E s s e n t i a l c o o k i e s
W e u s e e s s e n t i a l c o o k i e s t o p e r f o r m e s s e n t i a l w e b s i t e f u n c t i o n s , e . g . t h e y ' r e u s e d t o l o g y o u i n .
L e a r n m o r e
A l w a y s a c t i v e
A n a l y t i c s c o o k i e s
W e u s e a n a l y t i c s c o o k i e s t o u n d e r s t a n d h o w y o u u s e o u r w e b s i t e s s o w e c a n m a k e t h e m b e t t e r , e . g . t h e y ' r e u s e d t o g a t h e r i n f o r m a t i o n a b o u t t h e p a g e s y o u v i s i t a n d h o w m a n y c l i c k s y o u n e e d t o a c c o m p l i s h a t a s k .
L e a r n m o r e
A c c e p t
R e j e c t
S a v e p r e f e r e n c e s